From 7be8db78320b930968a8583c363b88b643b9ddcc Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:49:28 +0000 Subject: [PATCH] Move docs to website (#2571) # Description Please provide a summary of the changes, including relevant motivation and context. Closes #(issue_number) ## Checklist - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have performed a self-review of my own code - [ ] I have attached images of the change if it is UI based - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] If my code has heavily changed functionality I have updated relevant docs on [Stirling-PDFs doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) - [ ] My changes generate no new warnings - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) --- CONTRIBUTING.md | 4 +- Endpoint-groups.md | 46 --- FolderScanning.md | 41 --- LocalRunGuide.md | 327 ------------------ PipelineFeature.md | 42 --- README.md | 305 ++-------------- Version-groups.md | 68 ---- .../resources/templates/misc/ocr-pdf.html | 2 +- src/main/resources/templates/pipeline.html | 4 +- 9 files changed, 32 insertions(+), 807 deletions(-) delete mode 100644 Endpoint-groups.md delete mode 100644 FolderScanning.md delete mode 100644 LocalRunGuide.md delete mode 100644 PipelineFeature.md delete mode 100644 Version-groups.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 463cb433..9fad6ecb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,10 +35,10 @@ Documentation for Stirling-PDF is handled in a separate repository. Please see [ First, make sure you've read the section [Pull Requests](#pull-requests). -To build from the source, please follow this [Guide](LocalRunGuide.md). - If, at any point in time, you have a question, please feel free to ask in the same issue thread or in our [Discord](https://discord.gg/FJUSXUSYec). +Developers should review our [Developer Guide](DeveloperGuide.md) + ## License By contributing to this project, you agree that your contributions will be licensed under the [MIT License](LICENSE). diff --git a/Endpoint-groups.md b/Endpoint-groups.md deleted file mode 100644 index 5b32bbc4..00000000 --- a/Endpoint-groups.md +++ /dev/null @@ -1,46 +0,0 @@ -| Operation | PageOps | Convert | Security | Other | CLI | Python | OpenCV | LibreOffice | qpdf | Java | Javascript | Unoconv | tesseract | -| ------------------- | ------- | ------- | -------- | ----- | --- | ------ | ------ | ----------- | -------- | ---- | ---------- | ------- | ----------- | -| adjust-contrast | ✔️ | | | | | | | | | | ✔️ | | | -| auto-split-pdf | ✔️ | | | | | | | | | ✔️ | | | | -| crop | ✔️ | | | | | | | | | ✔️ | | | | -| extract-page | ✔️ | | | | | | | | | ✔️ | | | | -| merge-pdfs | ✔️ | | | | | | | | | ✔️ | | | | -| multi-page-layout | ✔️ | | | | | | | | | ✔️ | | | | -| pdf-organizer | ✔️ | | | | | | | | | ✔️ | ✔️ | | | -| pdf-to-single-page | ✔️ | | | | | | | | | ✔️ | | | | -| remove-pages | ✔️ | | | | | | | | | ✔️ | | | | -| rotate-pdf | ✔️ | | | | | | | | | ✔️ | | | | -| scale-pages | ✔️ | | | | | | | | | ✔️ | | | | -| split-pdfs | ✔️ | | | | | | | | | ✔️ | | | | -| file-to-pdf | | ✔️ | | | ✔️ | ✔️ | | ✔️ | | | | ✔️ | | -| img-to-pdf | | ✔️ | | | | | | | | ✔️ | | | | -| pdf-to-html | | ✔️ | | | ✔️ | | | ✔️ | | | | | | -| pdf-to-img | | ✔️ | | | | ✔️ | | | | ✔️ | | | | -| pdf-to-pdfa | | ✔️ | | | ✔️ | | | | ✔️ | | | | | -| pdf-to-markdown | | ✔️ | | | | | | | | ✔️ | | | | -| pdf-to-presentation | | ✔️ | | | ✔️ | | | ✔️ | | | | | | -| pdf-to-text | | ✔️ | | | ✔️ | | | ✔️ | | | | | | -| pdf-to-word | | ✔️ | | | ✔️ | | | ✔️ | | | | | | -| pdf-to-xml | | ✔️ | | | ✔️ | | | ✔️ | | | | | | -| add-password | | | ✔️ | | | | | | | ✔️ | | | | -| add-watermark | | | ✔️ | | | | | | | ✔️ | | | | -| cert-sign | | | ✔️ | | | | | | | ✔️ | | | | -| remove-cert-sign | | | ✔️ | | | | | | | ✔️ | | | | -| change-permissions | | | ✔️ | | | | | | | ✔️ | | | | -| remove-password | | | ✔️ | | | | | | | ✔️ | | | | -| sanitize-pdf | | | ✔️ | | | | | | | ✔️ | | | | -| add-image | | | | ✔️ | | | | | | ✔️ | | | | -| add-page-numbers | | | | ✔️ | | | | | | ✔️ | | | | -| auto-rename | | | | ✔️ | | | | | | ✔️ | | | | -| change-metadata | | | | ✔️ | | | | | | ✔️ | | | | -| compare | | | | ✔️ | | | | | | | ✔️ | | | -| compress-pdf | | | | ✔️ | ✔️ | | | | ✔️ | | | | | -| extract-image-scans | | | | ✔️ | ✔️ | ✔️ | ✔️ | | | | | | | -| extract-images | | | | ✔️ | | | | | | ✔️ | | | | -| flatten | | | | ✔️ | | | | | | | ✔️ | | | -| get-info-on-pdf | | | | ✔️ | | | | | | ✔️ | | | | -| ocr-pdf | | | | ✔️ | ✔️ | | | | | | | | ✔ | -| remove-blanks | | | | ✔️ | ✔️ | ✔️ | ✔️ | | | | | | | -| repair | | | | ✔️ | ✔️ | | | ✔️ | ✔ | | | | | -| show-javascript | | | | ✔️ | | | | | | | ✔️ | | | -| sign | | | | ✔️ | | | | | | | ✔️ | | | diff --git a/FolderScanning.md b/FolderScanning.md deleted file mode 100644 index 66707a10..00000000 --- a/FolderScanning.md +++ /dev/null @@ -1,41 +0,0 @@ -## User Guide for Local Directory Scanning and File Processing - -### Setting Up Watched Folders - -- Create a folder where you want your files to be monitored. This is your 'watched folder'. -- The default directory for this is `./pipeline/watchedFolders/`. -- Place any directories you want to be scanned into this folder. This folder should contain multiple folders, each for their own tasks and pipelines. - -### Configuring Processing with JSON Files - -- In each directory you want processed (e.g., `./pipeline/watchedFolders/officePrinter`), include a JSON configuration file. -- This JSON file should specify how you want the files in the directory to be handled (e.g., what operations to perform on them). This can be made, configured, and downloaded from the Stirling-PDF Pipeline interface. - -### Automatic Scanning and Processing - -- The system automatically checks the watched folder every minute for new directories and files to process. -- When a directory with a valid JSON configuration file is found, it begins processing the files inside according to the configuration. - -### Processing Steps - -- Files in each directory are processed according to the instructions in the JSON file. -- This might involve file conversions, data filtering, renaming files, etc. If the output of a step is a zip, this zip will be automatically unzipped as it passes to the next process. - -### Results and Output - -- After processing, the results are saved in a specified output location. This could be a different folder or location as defined in the JSON file or the default location `./pipeline/finishedFolders/`. -- Each processed file is named and organized according to the rules set in the JSON configuration. - -### Completion and Cleanup - -- Once processing is complete, the original files in the watched folder's directory are removed. -- You can find the processed files in the designated output location. - -### Error Handling - -- If there's an error during processing, the system will not delete the original files, allowing you to check and retry if necessary. - -### User Interaction - -- As a user, your main tasks are to set up the watched folders, place directories with files for processing, and create the corresponding JSON configuration files. -- The system handles the rest, including scanning, processing, and outputting results. diff --git a/LocalRunGuide.md b/LocalRunGuide.md deleted file mode 100644 index 177299c6..00000000 --- a/LocalRunGuide.md +++ /dev/null @@ -1,327 +0,0 @@ -To run the application without Docker/Podman, you will need to manually install all dependencies and build the necessary components. - -Note that some dependencies might not be available in the standard repositories of all Linux distributions, and may require additional steps to install. - -The following guide assumes you have a basic understanding of using a command line interface in your operating system. - -It should work on most Linux distributions and MacOS. For Windows, you might need to use Windows Subsystem for Linux (WSL) for certain steps. The amount of dependencies is to actually reduce overall size, i.e., installing LibreOffice subcomponents rather than the full LibreOffice package. - -You could theoretically use a Distrobox/Toolbox if your distribution has old or not all packages. But you might just as well use the Docker container then. - -### Step 1: Prerequisites - -Install the following software, if not already installed: - -- Java 17 or later (21 recommended) -- Gradle 7.0 or later (included within the repo, so not needed on the server) -- Git -- Python 3.8 (with pip) -- Make -- GCC/G++ -- Automake -- Autoconf -- libtool -- pkg-config -- zlib1g-dev -- libleptonica-dev - -For Debian-based systems, you can use the following command: - -```bash -sudo apt-get update -sudo apt-get install -y git automake autoconf libtool libleptonica-dev pkg-config zlib1g-dev make g++ openjdk-21-jdk python3 python3-pip -``` - -For Fedora-based systems, use this command: - -```bash -sudo dnf install -y git automake autoconf libtool leptonica-devel pkg-config zlib-devel make gcc-c++ java-21-openjdk python3 python3-pip -``` - -For non-root users with Nix Package Manager, use the following command: - -```bash -nix-channel --update -nix-env -iA nixpkgs.jdk21 nixpkgs.git nixpkgs.python38 nixpkgs.gnumake nixpkgs.libgcc nixpkgs.automake nixpkgs.autoconf nixpkgs.libtool nixpkgs.pkg-config nixpkgs.zlib nixpkgs.leptonica -``` - -### Step 2: Clone and Build jbig2enc (Only required for certain OCR functionality) - -For Debian and Fedora, you can build it from source using the following commands: - -```bash -mkdir ~/.git -cd ~/.git && \ -git clone https://github.com/agl/jbig2enc.git && \ -cd jbig2enc && \ -./autogen.sh && \ -./configure && \ -make && \ -sudo make install -``` - -For Nix, you will face `Leptonica not detected`. Bypass this by installing it directly using the following command: - -```bash -nix-env -iA nixpkgs.jbig2enc -``` - -### Step 3: Install Additional Software - -Next, we need to install LibreOffice for conversions, qpdf for OCR, and OpenCV for pattern recognition functionality. - -Install the following software: - -- libreoffice-core -- libreoffice-common -- libreoffice-writer -- libreoffice-calc -- libreoffice-impress -- python3-uno -- unoconv -- pngquant -- unpaper -- qpdf -- opencv-python-headless - -For Debian-based systems, you can use the following command: - -```bash -sudo apt-get install -y libreoffice-writer libreoffice-calc libreoffice-impress unpaper qpdf -pip3 install uno opencv-python-headless unoconv pngquant WeasyPrint --break-system-packages -``` - -For Fedora: - -```bash -sudo dnf install -y libreoffice-writer libreoffice-calc libreoffice-impress unpaper qpdf -pip3 install uno opencv-python-headless unoconv pngquant WeasyPrint -``` - -For Nix: - -```bash -nix-env -iA nixpkgs.unpaper nixpkgs.libreoffice nixpkgs.qpdf nixpkgs.poppler_utils -pip3 install uno opencv-python-headless unoconv pngquant WeasyPrint -``` - -### Step 4: Clone and Build Stirling-PDF - -```bash -cd ~/.git && \ -git clone https://github.com/Stirling-Tools/Stirling-PDF.git && \ -cd Stirling-PDF && \ -chmod +x ./gradlew && \ -./gradlew build -``` - -### Step 5: Move Jar to Desired Location - -After the build process, a `.jar` file will be generated in the `build/libs` directory. You can move this file to a desired location, for example, `/opt/Stirling-PDF/`. You must also move the Script folder within the Stirling-PDF repo that you have downloaded to this directory. This folder is required for the Python scripts using OpenCV. - -```bash -sudo mkdir /opt/Stirling-PDF && \ -sudo mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ && \ -sudo mv scripts /opt/Stirling-PDF/ && \ -echo "Scripts installed." -``` - -For non-root users, you can just keep the jar in the main directory of Stirling-PDF using the following command: - -```bash -mv ./build/libs/Stirling-PDF-*.jar ./Stirling-PDF-*.jar -``` - -### Step 6: Other Files - -#### OCR - -If you plan to use the OCR (Optical Character Recognition) functionality, you might need to install language packs for Tesseract if running non-English scanning. - -##### Installing Language Packs - -The easiest method is to use the language packs provided by your repositories. Skip the other steps if they are available. - -**Manual:** - -1. Download the desired language pack(s) by selecting the `.traineddata` file(s) for the language(s) you need. -2. Place the `.traineddata` files in the Tesseract tessdata directory: `/usr/share/tessdata` - -**IMPORTANT:** DO NOT REMOVE EXISTING `eng.traineddata`, IT'S REQUIRED. - -**Debian-based systems**, install languages with this command: - -```bash -sudo apt update && \ -# All languages -# sudo apt install -y 'tesseract-ocr-*' - -# Find languages: -apt search tesseract-ocr- - -# View installed languages: -dpkg-query -W tesseract-ocr- | sed 's/tesseract-ocr-//g' -``` - -**Fedora:** - -```bash -# All languages -# sudo dnf install -y tesseract-langpack-* - -# Find languages: -dnf search -C tesseract-langpack- - -# View installed languages: -rpm -qa | grep tesseract-langpack | sed 's/tesseract-langpack-//g' -``` - -**Nix:** - -```bash -nix-env -iA nixpkgs.tesseract -``` - -**Note:** Nix Package Manager pre-installs almost all the language packs when Tesseract is installed. - -### Step 7: Run Stirling-PDF - -Those who have pushed to the root directory, run the following commands: - -```bash -./gradlew bootRun -or -java -jar /opt/Stirling-PDF/Stirling-PDF-*.jar -``` - -Since LibreOffice, soffice, and conversion tools have their dbus_tmp_dir set as `dbus_tmp_dir="/run/user/$(id -u)/libreoffice-dbus"`, you might get the following error when using their endpoints: - -``` -[Thread-7] INFO s.s.SPDF.utils.ProcessExecutor - mkdir: cannot create directory ‘/run/user/1501’: Permission denied -``` - -To resolve this, before starting Stirling-PDF, you have to set the environment variable to a directory you have write access to by using the following commands: - -```bash -mkdir temp -export DBUS_SESSION_BUS_ADDRESS="unix:path=./temp" -./gradlew bootRun -or -java -jar ./Stirling-PDF-*.jar -``` - -### Step 8: Adding a Desktop Icon - -This will add a modified app starter to your app menu. - -```bash -location=$(pwd)/gradlew -image=$(pwd)/docs/stirling-transparent.svg - -cat > ~/.local/share/applications/Stirling-PDF.desktop < To force IPv4 only in the Java starting command - -**Note:** This file is created after the first application launch. To have it before that, you can create the directory and add the file yourself. - -### Optional: Run Stirling-PDF as a Service (requires root) - -First, create a `.env` file, where you can store environment variables: - -```bash -touch /opt/Stirling-PDF/.env -``` - -In this file, you can add all variables, one variable per line, as stated in the main readme (for example `SYSTEM_DEFAULTLOCALE="de-DE"`). - -Create a new file where we store our service settings and open it with the nano editor: - -```bash -nano /etc/systemd/system/stirlingpdf.service -``` - -Paste this content, and make sure to update the filename of the jar file. Press `Ctrl+S` and `Ctrl+X` to save and exit the nano editor: - -```ini -[Unit] -Description=Stirling-PDF service -After=syslog.target network.target - -[Service] -SuccessExitStatus=143 - -User=root -Group=root - -Type=simple - -EnvironmentFile=/opt/Stirling-PDF/.env -WorkingDirectory=/opt/Stirling-PDF -ExecStart=/usr/bin/java -jar Stirling-PDF-0.17.2.jar -ExecStop=/bin/kill -15 $MAINPID - -[Install] -WantedBy=multi-user.target -``` - -Notify systemd that it has to rebuild its internal service database (you have to run this command every time you make a change in the service file): - -```bash -sudo systemctl daemon-reload -``` - -Enable the service to tell it to start automatically: - -```bash -sudo systemctl enable stirlingpdf.service -``` - -See the status of the service: - -```bash -sudo systemctl status stirlingpdf.service -``` - -Manually start/stop/restart the service: - -```bash -sudo systemctl start stirlingpdf.service -sudo systemctl stop stirlingpdf.service -sudo systemctl restart stirlingpdf.service -``` - ---- - -Remember to set the necessary environment variables before running the project if you want to customize the application. The list can be seen in the main readme. - -You can do this in the terminal by using the `export` command or `-D` argument to the Java `-jar` command: - -```bash -export APP_HOME_NAME="Stirling PDF" -or --DAPP_HOME_NAME="Stirling PDF" diff --git a/PipelineFeature.md b/PipelineFeature.md deleted file mode 100644 index db1daa4f..00000000 --- a/PipelineFeature.md +++ /dev/null @@ -1,42 +0,0 @@ -# Pipeline Configuration and Usage Tutorial - -- Configure the pipeline config file and input files to run files against it. -- For reuse, download the config file and re-upload it when needed, or place it in `/pipeline/defaultWebUIConfigs/` to auto-load in the web UI for all users. - -## Steps to Configure and Use Your Pipeline - -1. **Access Configuration** - - Upon entering the screen, click on the **Configure** button. - -2. **Enter Pipeline Name** - - Provide a name for your pipeline in the designated field. - -3. **Select Operations** - - Choose the operations for your pipeline (e.g., **Split Pages**), then click **Add Operation**. - -4. **Configure Operation Settings** - - Input the necessary settings for each added operation. Settings are highlighted in yellow if customization is needed. - -5. **Add More Operations** - - You can add and adjust the order of multiple operations. Ensure each operation's settings are customized. - -6. **Save Settings** - - Click **Save Operation Settings** after customizing settings for each operation. - -7. **Validate Pipeline** - - Use the **Validation** button to check your pipeline. A green indicator signifies correct setup; a pop-out error indicates issues. - -8. **Download Pipeline Configuration** - - To use the configuration for folder scanning (or save it for future use and re-upload it), download a JSON file in this menu. You can also pre-load it for future use by placing it in `/pipeline/defaultWebUIConfigs/`. It will then appear in the dropdown menu for all users to use. - -9. **Submit Files for Processing** - - If your pipeline is correctly set up, close the configure menu, input the files, and hit **Submit**. - -10. **Note on Web UI Limitations** - - The current web UI version does not support operations that require multiple different types of inputs, such as adding a separate image to a PDF. - -### Current Limitations - -- Cannot have more than one of the same operation. -- Cannot input additional files via UI. -- All files and operations run in serial mode. diff --git a/README.md b/README.md index 62589fc4..785a4e2f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/frooodle/s-pdf/latest)](https://github.com/Stirling-Tools/Stirling-PDF/) [![GitHub Repo stars](https://img.shields.io/github/stars/stirling-tools/stirling-pdf?style=social)](https://github.com/Stirling-Tools/stirling-pdf) + Stirling PDF - Open source locally hosted web PDF editor | Product Hunt [![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/Stirling-Tools/Stirling-PDF/tree/digitalOcean&refcode=c3210994b1af) @@ -13,18 +14,22 @@ All files and PDFs exist either exclusively on the client side, reside in server memory only during task execution, or temporarily reside in a file solely for the execution of the task. Any file downloaded by the user will have been deleted from the server by that point. + +All information available at [https://docs.stirlingpdf.com/](https://docs.stirlingpdf.com/) + ![stirling-home](images/stirling-home.jpg) ## Features -- Enterprise features like SSO Check [here](https://docs.stirlingpdf.com/Enterprise%20Edition) +- 50+ PDF Operations +- Parallel file processing and downloads - Dark mode support - Custom download options -- Parallel file processing and downloads -- Custom 'Pipelines' to run multiple features in a queue +- Custom 'Pipelines' to run multiple features in a automated queue - API for integration with external scripts -- Optional Login and Authentication support (see [here](https://github.com/Stirling-Tools/Stirling-PDF/tree/main#login-authentication) for documentation) -- Database Backup and Import (see [here](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DATABASE.md) for documentation) +- Optional Login and Authentication support (see [here](https://docs.stirlingpdf.com/Advanced%20Configuration/System%20and%20Security) for documentation) +- Database Backup and Import (see [here](https://docs.stirlingpdf.com/Advanced%20Configuration/DATABASE) for documentation) +- Enterprise features like SSO see [here](https://docs.stirlingpdf.com/Enterprise%20Edition) ## PDF Features @@ -90,97 +95,20 @@ All files and PDFs exist either exclusively on the client side, reside in server - Get all information on a PDF to view or export as JSON - Show/detect embedded JavaScript -For an overview of the tasks and the technology each uses, please view [Endpoint-groups.md](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/Endpoint-groups.md). -A demo of the app is available [here](https://stirlingpdf.io). -## Technologies Used -- Spring Boot + Thymeleaf -- [PDFBox](https://github.com/apache/pdfbox/tree/trunk) -- [LibreOffice](https://www.libreoffice.org/discover/libreoffice/) for advanced conversions -- [qpdf](https://github.com/qpdf/qpdf) -- HTML, CSS, JavaScript -- Docker -- [PDF.js](https://github.com/mozilla/pdf.js) -- [PDF-LIB.js](https://github.com/Hopding/pdf-lib) +# 📖 Get Started -## How to Use +Visit our comprehensive documentation at [docs.stirlingpdf.com](https://docs.stirlingpdf.com) for: -### Windows +- Installation guides for all platforms +- Configuration options +- Feature documentation +- API reference +- Security setup +- Enterprise features -For Windows users, download the latest Stirling-PDF.exe from our [release](https://github.com/Stirling-Tools/Stirling-PDF/releases) section or by clicking [here](https://github.com/Stirling-Tools/Stirling-PDF/releases/latest/download/Stirling-PDF.exe). - -### Locally - -Please view the [LocalRunGuide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/LocalRunGuide.md). - -### Docker / Podman - -> [!NOTE] -> - -Stirling-PDF has three different versions: a full version, an ultra-lite version, and a 'fat' version. 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](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/Version-groups.md). For people who don't mind space optimization, just use the latest tag. - -![Docker Image Size (tag)](https://img.shields.io/docker/image-size/stirlingtools/stirling-pdf/latest?label=Stirling-PDF%20Full) -![Docker Image Size (tag)](https://img.shields.io/docker/image-size/stirlingtools/stirling-pdf/latest-ultra-lite?label=Stirling-PDF%20Ultra-Lite) -![Docker Image Size (tag)](https://img.shields.io/docker/image-size/stirlingtools/stirling-pdf/latest-fat?label=Stirling-PDF%20Fat) - -Please note in the examples below, you may need to change the volume paths as needed, e.g., `./extraConfigs:/configs` to `/opt/stirlingpdf/extraConfigs:/configs`. - -### Docker Run - -```bash -docker run -d \ - -p 8080:8080 \ - -v ./trainingData:/usr/share/tessdata \ - -v ./extraConfigs:/configs \ - -v ./logs:/logs \ -# Optional customization (not required) -# -v /location/of/customFiles:/customFiles \ - -e DOCKER_ENABLE_SECURITY=false \ - -e INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false \ - -e LANGS=en_GB \ - --name stirling-pdf \ - stirlingtools/stirling-pdf:latest -``` - -### Docker Compose - -```yaml -version: '3.3' -services: - stirling-pdf: - image: stirlingtools/stirling-pdf:latest - ports: - - '8080:8080' - volumes: - - ./trainingData:/usr/share/tessdata # Required for extra OCR languages - - ./extraConfigs:/configs -# - ./customFiles:/customFiles/ -# - ./logs:/logs/ - environment: - - DOCKER_ENABLE_SECURITY=false - - INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false - - LANGS=en_GB -``` - -Note: Podman is CLI-compatible with Docker, so simply replace "docker" with "podman". - -### Kubernetes - -See the kubernetes helm chart [here](https://github.com/Stirling-Tools/Stirling-PDF-chart) - -## Enable OCR/Compression Feature - -Please view the [HowToUseOCR.md](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToUseOCR.md). - -## Reuse Stored Files - -Certain functionality like `Sign` supports pre-saved files stored at `/customFiles/signatures/`. Image files placed here will be accessible via the web UI. Currently, this supports two folder types: - -- `/customFiles/signatures/ALL_USERS`: Accessible to all users, useful for organizations where many users use the same files or for users not using authentication -- `/customFiles/signatures/{username}`: Such as `/customFiles/signatures/froodle`, accessible only to the `froodle` username, private for all others ## Supported Languages @@ -227,197 +155,18 @@ Stirling-PDF currently supports 38 languages! | Ukrainian (Українська) (uk_UA) | ![76%](https://geps.dev/progress/76) | | Vietnamese (Tiếng Việt) (vi_VN) | ![83%](https://geps.dev/progress/83) | -## Contributing (Creating Issues, Translations, Fixing Bugs, etc.) - -Please see our [Contributing Guide](CONTRIBUTING.md). ## Stirling PDF Enterprise -Stirling PDF offers an Enterprise edition of its software. This is the same great software but with added features and comforts. +Stirling PDF offers an Enterprise edition of its software. This is the same great software but with added features, support and comforts. +Check out our [Enterprise docs](https://docs.stirlingpdf.com/Enterprise%20Edition) -### What's included -- Prioritized Support tickets via support@stirlingpdf.com to reach directly to Stirling-PDF team for support and 1:1 meetings where applicable (Provided they come from the same email domain registered with us) -- Prioritised Enhancements to Stirling-PDF where applicable -- Base SSO support -- Advanced SSO such as automated login handling (Coming very soon) -- SAML SSO (Coming very soon) -- Custom automated metadata handling -- Advanced user configurations (Coming soon) -- Plus other exciting features to come +## 🤝 Looking to contribute? -Check out our [docs](https://docs.stirlingpdf.com/Enterprise%20Edition) on it or our official [website](https://www.stirlingpdf.com) - -## Customization - -Stirling-PDF allows easy customization of the app, including things like: - -- Custom application name -- Custom slogans, icons, HTML, images, CSS, etc. (via file overrides) - -There are two options for this, either using the generated settings file `settings.yml`, which is located in the `/configs` directory and follows standard YAML formatting, or using environment variables, which would override the settings file. - -For example, in `settings.yml`, you might have: - -```yaml -security: - enableLogin: 'true' -``` - -To have this via an environment variable, you would use `SECURITY_ENABLELOGIN`. - -The current list of settings is: - -```yaml -security: - enableLogin: false # set to 'true' to enable login - csrfDisabled: true # set to 'true' to disable CSRF protection (not recommended for production) - loginAttemptCount: 5 # lock user account after 5 tries; when using e.g. Fail2Ban you can deactivate the function with -1 - loginResetTimeMinutes: 120 # lock account for 2 hours after x attempts - loginMethod: all # 'all' (Login Username/Password and OAuth2[must be enabled and configured]), 'normal'(only Login with Username/Password) or 'oauth2'(only Login with OAuth2) - initialLogin: - username: '' # initial username for the first login - password: '' # initial password for the first login - oauth2: - enabled: false # set to 'true' to enable login (Note: enableLogin must also be 'true' for this to work) - client: - keycloak: - issuer: '' # URL of the Keycloak realm's OpenID Connect Discovery endpoint - clientId: '' # client ID for Keycloak OAuth2 - clientSecret: '' # client secret for Keycloak OAuth2 - scopes: openid, profile, email # scopes for Keycloak OAuth2 - useAsUsername: preferred_username # field to use as the username for Keycloak OAuth2 - google: - clientId: '' # client ID for Google OAuth2 - clientSecret: '' # client secret for Google OAuth2 - scopes: https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/userinfo.profile # scopes for Google OAuth2 - useAsUsername: email # field to use as the username for Google OAuth2 - github: - clientId: '' # client ID for GitHub OAuth2 - clientSecret: '' # client secret for GitHub OAuth2 - scopes: read:user # scope for GitHub OAuth2 - useAsUsername: login # field to use as the username for GitHub OAuth2 - issuer: '' # set to any provider that supports OpenID Connect Discovery (/.well-known/openid-configuration) endpoint - clientId: '' # client ID from your provider - clientSecret: '' # client secret from your provider - autoCreateUser: false # set to 'true' to allow auto-creation of non-existing users - blockRegistration: false # set to 'true' to deny login with SSO without prior registration by an admin - useAsUsername: email # default is 'email'; custom fields can be used as the username - scopes: openid, profile, email # specify the scopes for which the application will request permissions - provider: google # set this to your OAuth provider's name, e.g., 'google' or 'keycloak' - saml2: - enabled: false # currently in alpha, not recommended for use yet, enableAlphaFunctionality must be set to true - autoCreateUser: false # set to 'true' to allow auto-creation of non-existing users - blockRegistration: false # set to 'true' to deny login with SSO without prior registration by an admin - registrationId: stirling - idpMetadataUri: https://dev-XXXXXXXX.okta.com/app/externalKey/sso/saml/metadata - idpSingleLogoutUrl: https://dev-XXXXXXXX.okta.com/app/dev-XXXXXXXX_stirlingpdf_1/externalKey/slo/saml - idpSingleLoginUrl: https://dev-XXXXXXXX.okta.com/app/dev-XXXXXXXX_stirlingpdf_1/externalKey/sso/saml - idpIssuer: http://www.okta.com/externalKey - idpCert: classpath:okta.crt - privateKey: classpath:saml-private-key.key - spCert: classpath:saml-public-cert.crt - -enterpriseEdition: - enabled: false # set to 'true' to enable enterprise edition - key: 00000000-0000-0000-0000-000000000000 - CustomMetadata: - autoUpdateMetadata: false # set to 'true' to automatically update metadata with below values - author: username # supports text such as 'John Doe' or types such as username to autopopulate with user's username - creator: Stirling-PDF # supports text such as 'Company-PDF' - producer: Stirling-PDF # supports text such as 'Company-PDF' - -legal: - termsAndConditions: https://www.stirlingpdf.com/terms-and-conditions # URL to the terms and conditions of your application (e.g. https://example.com/terms). Empty string to disable or filename to load from local file in static folder - privacyPolicy: https://www.stirlingpdf.com/privacy-policy # URL to the privacy policy of your application (e.g. https://example.com/privacy). Empty string to disable or filename to load from local file in static folder - accessibilityStatement: '' # URL to the accessibility statement of your application (e.g. https://example.com/accessibility). Empty string to disable or filename to load from local file in static folder - cookiePolicy: '' # URL to the cookie policy of your application (e.g. https://example.com/cookie). Empty string to disable or filename to load from local file in static folder - impressum: '' # URL to the impressum of your application (e.g. https://example.com/impressum). Empty string to disable or filename to load from local file in static folder - -system: - defaultLocale: en-US # set the default language (e.g. 'de-DE', 'fr-FR', etc) - googlevisibility: false # 'true' to allow Google visibility (via robots.txt), 'false' to disallow - enableAlphaFunctionality: false # set to enable functionality which might need more testing before it fully goes live (this feature might make no changes) - showUpdate: false # see when a new update is available - showUpdateOnlyAdmin: false # only admins can see when a new update is available, depending on showUpdate it must be set to 'true' - customHTMLFiles: false # enable to have files placed in /customFiles/templates override the existing template HTML files - tessdataDir: /usr/share/tessdata # path to the directory containing the Tessdata files. This setting is relevant for Windows systems. For Windows users, this path should be adjusted to point to the appropriate directory where the Tessdata files are stored. - enableAnalytics: undefined # set to 'true' to enable analytics, set to 'false' to disable analytics; for enterprise users, this is set to true - -ui: - appName: '' # application's visible name - homeDescription: '' # short description or tagline shown on the homepage - appNameNavbar: '' # name displayed on the navigation bar - -endpoints: - toRemove: [] # list endpoints to disable (e.g. ['img-to-pdf', 'remove-pages']) - groupsToRemove: [] # list groups to disable (e.g. ['LibreOffice']) - -metrics: - enabled: true # 'true' to enable Info APIs (`/api/*`) endpoints, 'false' to disable - -# Automatically Generated Settings (Do Not Edit Directly) -AutomaticallyGenerated: - key: example - UUID: example -``` - -There is an additional config file `/configs/custom_settings.yml` where users familiar with Java and Spring `application.properties` can input their own settings on top of Stirling-PDF's existing ones. - -### Extra Notes - -- **Endpoints**: Currently, the `ENDPOINTS_TO_REMOVE` and `GROUPS_TO_REMOVE` endpoints can include comma-separated lists of endpoints and groups to disable. For example, `ENDPOINTS_TO_REMOVE=img-to-pdf,remove-pages` would disable both image-to-pdf and remove pages, while `GROUPS_TO_REMOVE=LibreOffice` would disable all things that use LibreOffice. You can see a list of all endpoints and groups [here](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/Endpoint-groups.md). -- **customStaticFilePath**: Customize static files such as the app logo by placing files in the `/customFiles/static/` directory. An example of customizing the app logo is placing `/customFiles/static/favicon.svg` to override the current SVG. This can be used to change any `images/icons/css/fonts/js`, etc. in Stirling-PDF. - -### Environment-Only Parameters - -- `SYSTEM_ROOTURIPATH` - Set the application's root URI (e.g. `/pdf-app` to set the root URI to `localhost:8080/pdf-app`) -- `SYSTEM_CONNECTIONTIMEOUTMINUTES` - Set custom connection timeout values -- `DOCKER_ENABLE_SECURITY` - Set to `true` to download security jar (required for authentication login) -- `INSTALL_BOOK_AND_ADVANCED_HTML_OPS` - Download Calibre onto Stirling-PDF to enable PDF to/from book and advanced HTML conversion -- `LANGS` - Define custom font libraries to install for document conversions - -## API - -For those wanting to use Stirling-PDF's backend API to link with their own custom scripting to edit PDFs, you can view all existing API documentation [here](https://app.swaggerhub.com/apis-docs/Stirling-Tools/Stirling-PDF/), or navigate to `/swagger-ui/index.html` of your Stirling-PDF instance for your version's documentation (or by following the API button in the settings of Stirling-PDF). - -## Login Authentication - -![stirling-login](images/login-light.png) - -### Prerequisites - -- User must have the folder `./configs` volumed within Docker so that it is retained during updates. -- Docker users must download the security jar version by setting `DOCKER_ENABLE_SECURITY` to `true` in environment variables. -- Then either enable login via the `settings.yml` file or set `SECURITY_ENABLE_LOGIN` to `true`. -- Now the initial user will be generated with username `admin` and password `stirling`. On login, you will be forced to change the password to a new one. You can also use the environment variables `SECURITY_INITIALLOGIN_USERNAME` and `SECURITY_INITIALLOGIN_PASSWORD` to set your own credentials straight away (recommended to remove them after user creation). - -Once the above has been done, on restart, a new `stirling-pdf-DB.mv.db` will show if everything worked. - -When you log in to Stirling-PDF, you will be redirected to the `/login` page to log in with those default credentials. After login, everything should function as normal. - -To access your account settings, go to Account Settings in the settings cog menu (top right in the navbar). This Account Settings menu is also where you find your API key. - -To add new users, go to the bottom of Account Settings and hit 'Admin Settings'. Here, you can add new users. The different roles mentioned within this are for rate limiting. This is a work in progress and will be expanded on more in the future. - -For API usage, you must provide a header with `X-API-KEY` and the associated API key for that user. - -## FAQ - -### Q1: What are your planned features? - -- Progress bar/tracking -- Full custom logic pipelines to combine multiple operations together -- Folder support with auto-scanning to perform operations on -- Redact text (via UI, not just automated) -- Add forms -- Multi-page layout (stitch PDF pages together) support x rows y columns and custom page sizing -- Fill forms manually or automatically - -### Q2: Why is my application downloading .htm files? Why am I getting HTTP error 413? - -This is an issue commonly caused by your NGINX configuration. 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). - -### Q3: Why is my download timing out? - -NGINX has timeout values by default, so if you are running Stirling-PDF behind NGINX, you may need to set a timeout value, such as adding the config `proxy_read_timeout 3600;`. +Join our community: +- [Contribution Guidelines](CONTRIBUTING.md) +- [Translation Guide (How to add custom languages)](HowToAddNewLanguage.md) +- [Issue Tracker](https://github.com/Stirling-Tools/Stirling-PDF/issues) +- [Discord Community](https://discord.gg/HYmhKj45pU) +- [Developer Guide](DeveloperGuide.md) \ No newline at end of file diff --git a/Version-groups.md b/Version-groups.md deleted file mode 100644 index c8f3aff8..00000000 --- a/Version-groups.md +++ /dev/null @@ -1,68 +0,0 @@ -All versions in a Docker environment can download Calibre as a optional extra at runtime to support `book-to-pdf` and `pdf-to-book` using parameter ``INSTALL_BOOK_AND_ADVANCED_HTML_OPS``. -The 'Fat' container contains all those found in 'Full' with security jar along with this Calibre install. - -| Technology | Ultra-Lite | Full | -| ---------- | :--------: | :---: | -| Java | ✔️ | ✔️ | -| JavaScript | ✔️ | ✔️ | -| Libre | | ✔️ | -| Python | | ✔️ | -| OpenCV | | ✔️ | -| qpdf | | ✔️ | - -| Operation | Ultra-Lite | Full | -| ---------------------- | ---------- | ---- | -| add-page-numbers | ✔️ | ✔️ | -| add-password | ✔️ | ✔️ | -| add-image | ✔️ | ✔️ | -| add-watermark | ✔️ | ✔️ | -| adjust-contrast | ✔️ | ✔️ | -| auto-split-pdf | ✔️ | ✔️ | -| auto-redact | ✔️ | ✔️ | -| auto-rename | ✔️ | ✔️ | -| cert-sign | ✔️ | ✔️ | -| remove-cert-sign | ✔️ | ✔️ | -| crop | ✔️ | ✔️ | -| change-metadata | ✔️ | ✔️ | -| change-permissions | ✔️ | ✔️ | -| compare | ✔️ | ✔️ | -| extract-page | ✔️ | ✔️ | -| extract-images | ✔️ | ✔️ | -| flatten | ✔️ | ✔️ | -| get-info-on-pdf | ✔️ | ✔️ | -| img-to-pdf | ✔️ | ✔️ | -| markdown-to-pdf | ✔️ | ✔️ | -| merge-pdfs | ✔️ | ✔️ | -| multi-page-layout | ✔️ | ✔️ | -| overlay-pdf | ✔️ | ✔️ | -| pdf-organizer | ✔️ | ✔️ | -| pdf-to-csv | ✔️ | ✔️ | -| pdf-to-img | ✔️ | ✔️ | -| pdf-to-single-page | ✔️ | ✔️ | -| remove-pages | ✔️ | ✔️ | -| remove-password | ✔️ | ✔️ | -| rotate-pdf | ✔️ | ✔️ | -| sanitize-pdf | ✔️ | ✔️ | -| scale-pages | ✔️ | ✔️ | -| sign | ✔️ | ✔️ | -| show-javascript | ✔️ | ✔️ | -| split-by-size-or-count | ✔️ | ✔️ | -| split-pdf-by-sections | ✔️ | ✔️ | -| split-pdfs | ✔️ | ✔️ | -| compress-pdf | | ✔️ | -| extract-image-scans | | ✔️ | -| ocr-pdf | | ✔️ | -| pdf-to-pdfa | | ✔️ | -| remove-blanks | | ✔️ | -| pdf-to-text | ✔️ | ✔️ | -| pdf-to-html | | ✔️ | -| pdf-to-word | | ✔️ | -| pdf-to-presentation | | ✔️ | -| pdf-to-xml | | ✔️ | -| remove-annotations | ✔️ | ✔️ | -| remove-cert-sign | ✔️ | ✔️ | -| remove-image-pdf | ✔️ | ✔️ | -| file-to-pdf | | ✔️ | -| html-to-pdf | | ✔️ | -| url-to-pdf | | ✔️ | -| repair | | ✔️ | diff --git a/src/main/resources/templates/misc/ocr-pdf.html b/src/main/resources/templates/misc/ocr-pdf.html index d37c1c2a..9af532f4 100644 --- a/src/main/resources/templates/misc/ocr-pdf.html +++ b/src/main/resources/templates/misc/ocr-pdf.html @@ -220,7 +220,7 @@ });

- https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToUseOCR.md + https://docs.stirlingpdf.com/Advanced%20Configuration/OCR diff --git a/src/main/resources/templates/pipeline.html b/src/main/resources/templates/pipeline.html index 30feea9f..a81d4b91 100644 --- a/src/main/resources/templates/pipeline.html +++ b/src/main/resources/templates/pipeline.html @@ -76,14 +76,14 @@
Pipeline Help
Folder Scanning Help