Giter Site home page Giter Site logo

webysther / stirling-pdf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stirling-tools/stirling-pdf

0.0 1.0 0.0 32.21 MB

locally hosted web application that allows you to perform various operations on PDF files

License: GNU General Public License v3.0

Shell 0.06% JavaScript 15.16% Python 1.27% Java 44.24% CSS 2.76% HTML 36.36% Dockerfile 0.15%

stirling-pdf's Introduction


Stirling-PDF

Docker Pulls Discord Docker Image Version (tag latest semver) GitHub Repo stars Paypal Donate Github Sponser

This is a powerful locally hosted web based PDF manipulation tool using docker that allows you to perform various operations on PDF files, such as splitting merging, converting, reorganizing, adding images, rotating, compressing, and more. This locally hosted web application started as a 100% ChatGPT-made application and has evolved to include a wide range of features to handle all your PDF needs.

Stirling PDF makes no outbound calls for any record keeping or tracking.

All files and PDFs are either purely client side, in server memory only during the execution of the task or within a temporay file only for execution of the task. Any file which has been downloaded by the user will have already been deleted from the server by that time.

Feel free to request any features or bug fixes either in github issues or our Discord

stirling-home

Features

  • Full interactive GUI for merging/splitting/rotating/moving PDFs and their pages.
  • Split PDFs into multiple files at specified page numbers or extract all pages as individual files.
  • Merge multiple PDFs together into a single resultant file
  • Convert PDFs to and from images
  • Reorganize PDF pages into different orders.
  • Add/Generate signatures
  • Flatten PDFs
  • Repair PDFs
  • Detect and remove blank pages
  • Compare 2 PDFs and show differences in text
  • Add images to PDFs
  • Rotating PDFs in 90 degree increments.
  • Compressing PDFs to decrease their filesize. (Using OCRMyPDF)
  • Add and remove passwords
  • Set PDF Permissions
  • Add watermark(s)
  • Convert Any common file to PDF (using LibreOffice)
  • Convert PDF to Word/Powerpoint/Others (using LibreOffice)
  • Extract images from PDF
  • OCR on PDF (Using OCRMyPDF)
  • Edit metadata
  • Dark mode support.
  • Custom download options (see here for example)
  • Parallel file processing and downloads
  • API for integration with external scripts

For a overview of the tasks and the technology each uses please view groups.md Hosted instance/demo of the app can be seen here hosted by the team at adminforge.de

Technologies used

  • Spring Boot + Thymeleaf
  • PDFBox
  • IText7
  • LibreOffice for advanced conversions
  • OcrMyPdf
  • HTML, CSS, JavaScript
  • Docker
  • PDF.js
  • PDF-LIB.js

How to use

Locally

Please view https://github.com/Frooodle/Stirling-PDF/blob/main/LocalRunGuide.md

Docker

https://hub.docker.com/r/frooodle/s-pdf

Stirling PDF has 3 different versions, a Full version, Lite and ultra-Lite. Depending on the types of features you use you may want a smaller image to save on space. To see what the different versions offer please look at our version mapping For people that dont mind about space optimisation just use latest tag. Docker Image Size (tag) Docker Image Size (tag) Docker Image Size (tag)

Docker Run

docker run -d \
  -p 8080:8080 \
  -v /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata \
  --name stirling-pdf \
  frooodle/s-pdf:latest
  
  
  Can also add these for customisation but are not required
  -e APP_HOME_NAME="Stirling PDF" \
  -e APP_HOME_DESCRIPTION="Your locally hosted one-stop-shop for all your PDF needs." \
  -e APP_NAVBAR_NAME="Stirling PDF" \
  -e ALLOW_GOOGLE_VISIBILITY="true" \
  -e APP_ROOT_PATH="/" \
  -e APP_LOCALE="en_GB" \

Docker Compose

version: '3.3'
services:
  stirling-pdf:
    image: frooodle/s-pdf:latest
    ports:
      - '8080:8080'
    volumes:
      - /location/of/trainingData:/usr/share/tesseract-ocr/4.00/tessdata #Required for extra OCR languages
#      - /location/of/extraConfigs:/configs
#    environment:
#      APP_LOCALE: en_GB
#      APP_HOME_NAME: Stirling PDF
#      APP_HOME_DESCRIPTION: Your locally hosted one-stop-shop for all your PDF needs.
#      APP_NAVBAR_NAME: Stirling PDF
#      APP_ROOT_PATH: /
#      ALLOW_GOOGLE_VISIBILITY: true

Enable OCR/Compression feature

Please view https://github.com/Frooodle/Stirling-PDF/blob/main/HowToUseOCR.md

Want to add your own language?

Stirling PDF currently supports 16!

  • English (English) (en_GB)
  • Arabic (العربية) (ar_AR)
  • German (Deutsch) (de_DE)
  • French (Français) (fr_FR)
  • Spanish (Español) (es_ES)
  • Chinese (简体中文) (zh_CN)
  • Catalan (Català) (ca_CA)
  • Italian (Italiano) (it_IT)
  • Swedish (Svenska) (sv_SE)
  • Polish (Polski) (pl_PL)
  • Romanian (Română) (ro_RO)
  • Korean (한국어) (ko_KR)
  • Portuguese Brazilian (Português) (pt_BR)
  • Russian (Русский) (ru_RU)
  • Basque (Euskara) (eu_ES)
  • Japanese (日本語) (ja_JP)

If you want to add your own language to Stirling-PDF please refer https://github.com/Frooodle/Stirling-PDF/blob/main/HowToAddNewLanguage.md

And please create a PR to merge it back in so others can use it!

Also please note as i add new features i will google translate existing languages so that they dont lose support. This could mean that new features need grammer corrections as added.

How to View

  1. Open a web browser and navigate to http://localhost:8080/
  2. Use the application by following the instructions on the website.

Customize App

Stirling PDF allows easy customization of the visible application name. Simply use environment variables APP_HOME_NAME, APP_HOME_DESCRIPTION and APP_NAVBAR_NAME with Docker or Java. If running Java directly, you can also pass these as properties using -D arguments.

Using the same method you can also change

  • The default language by providing APP_LOCALE with values like de-DE fr-FR or ar-AR (Note the - character not _ ) to select your default language (Will always default to English on invalid locale) Current accepted locales can be seen above in the Want to add your own language section
  • Enable/Disable search engine visiblility with ALLOW_GOOGLE_VISIBILITY with true / false values. Default disable visiblility.
  • Change root URI for Stirling-PDF ie change server.com/ to server.com/pdf-app by running APP_ROOT_PATH as pdf-app
  • Disable and remove endpoints and functionality from Stirling-PDF. Currently the endpoints ENDPOINTS_TO_REMOVE and GROUPS_TO_REMOVE can include comma seperated lists of endpoints and groups to disable as example ENDPOINTS_TO_REMOVE=img-to-pdf,remove-pages would disable both image to pdf and remove pages, GROUPS_TO_REMOVE=LibreOffice Would disable all things that use LibreOffice. You can see a list of all endpoints and groups here
  • Change the max file size allowed through the server with the environment variable MAX_FILE_SIZE. default 2000MB

API

For those wanting to use Stirling-PDFs backend API to link with their own custom scripting to edit PDFs you can view all existing API documentation here or navigate to /swagger-ui/index.html of your stirling-pdf instance for your versions documentation

FAQ

Q1: Can you add authentication in Stirling PDF?

There is no Auth within Stirling PDF and there is none planned. This feature will not be added. Instead we recommended you use trusted and secure authentication software like Authentik or Authelia.

Q2: What are your planned features?

  • Crop
  • Progress bar/Tracking
  • Full custom logic pipelines to combine multiple operations together.
  • Folder support with auto scanning to perform operations on
  • Redact sections of pages
  • Add page numbers
  • Auto rename (Renames file based on file title text)
  • URL to PDF
  • Change contrast

Q3: Why is my application downloading .htm files?

This is a issue caused commonly by your NGINX congifuration. The default file upload size for NGINX is 1MB, you need to add the following in your Nginx sites-available file. client_max_body_size SIZE; Where "SIZE" is 50M for example for 50MB files.

stirling-pdf's People

Contributors

alanimdeo avatar albertopasqualetto avatar blairw avatar boredsquirrel avatar dependabot[bot] avatar frooodle avatar inazkue avatar itsfks avatar ixeguy avatar izumi-zu avatar jabsysemb avatar jordyjordy avatar laserkaspar avatar leeastone avatar libertyunion avatar louiskram avatar manumora avatar marco-79 avatar mayannf avatar mms-gianni avatar mwllgr avatar neiljared avatar pesaventofilippo avatar pitah81 avatar pl4nty avatar rubenixnagios avatar sf298 avatar tkymmm avatar wrongecho avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.