From 45aead89e3bb4c414953648a2bc235b0d56f51bf Mon Sep 17 00:00:00 2001 From: sbplat <71648843+sbplat@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:35:34 -0500 Subject: [PATCH 1/2] docs: add contributing guide --- CONTRIBUTING.md | 68 +++++++++++++++++++++++ README.md | 139 ++++++++++++++++++------------------------------ 2 files changed, 119 insertions(+), 88 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..f9902c41 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,68 @@ +# Contributing to Stirling-PDF + +Thank you for your interest in contributing to Stirling-PDF! There are many ways to contribute other than writing code. For example, reporting bugs, creating suggestions, and adding or modifying translations. + +## Issue Guidelines + +Issues can be used to report bugs, request features, or ask questions. If you have a question, you could also ask us in our [Discord](https://discord.gg/FJUSXUSYec). + +Before opening an issue, please check to make sure someone hasn't already opened an issue about it. + +## Pull Requests + +Before you start working on an issue, please comment on (or create) the issue and wait for it to be assigned to you. If someone has already been assigned but didn't have the time to work on it lately, please communicate with them and ask if they're still working on it. This is to avoid multiple people working on the same issue. + +Once you have been assigned an issue, you can start working on it. When you are ready to submit your changes, open a pull request. +For a detailed pull request tutorial, see [this guide](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github). + +Please make sure your Pull Request adheres to the following guidelines: + +- Use the PR template provided. +- Keep your Pull Request title succinct, detailed and to the point. +- Keep commits atomic. One commit should contain one change. If you want to make multiple changes, submit multiple Pull Requests. +- Commits should be clear, concise and easy to understand. +- References to the Issue number in the Pull Request and/or Commit message. + +## Translations + +Stirling PDF currently supports 26! +- English (English) (en_GB) +- English (US) (en_US) +- Arabic (العربية) (ar_AR) +- German (Deutsch) (de_DE) +- French (Français) (fr_FR) +- Spanish (Español) (es_ES) +- Simplified Chinese (简体中文) (zh_CN) +- Traditional Chinese (繁體中文) (zh_TW) +- 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) +- Dutch (Nederlands) (nl_NL) +- Greek (el_GR) +- Turkish (Türkçe) (tr_TR) +- Indonesia (Bahasa Indonesia) (id_ID) +- Hindi (हिंदी) (hi_IN) +- Hungarian (Magyar) (hu_HU) +- Bulgarian (Български) (bg_BG) +- Sebian Latin alphabet (Srpski) (sr-Latn-RS) + +If you would like to add or modify a translation, please see [How to add new languages to Stirling-PDF](HowToAddNewLanguage.md). Also, please create a Pull Request so others can use it! + +## Fixing Bugs or Adding a New Feature + +First, make sure you've read the section [Pull Requests](#pull-requests). + +To build from source, please follow this [Guide](LocalRunGuide.md). + +If, at any point of time, you have a question, please feel free to ask in the same issue thread or in our [Discord](https://discord.gg/FJUSXUSYec). + +## License + +By contributing to this project, you agree that your contributions will be licensed under the [GPL 3 License](LICENSE). You also acknowledge and agree that your contributions will be included in Stirling-PDF and that they can be relicensed in the future under the MPL 2.0 (Mozilla Public License Version 2.0) license. diff --git a/README.md b/README.md index 4d79b6a3..fa389cb0 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,13 @@ Stirling PDF makes no outbound calls for any record keeping or tracking. 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. -Please feel free to submit feature requests or report bugs either through GitHub issues or on our [Discord](https://discord.gg/Cn8pWhQRxZ) - ![stirling-home](images/stirling-home.png) ## Features - Dark mode support. - Custom download options (see [here](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/images/settings.png) for example) - Parallel file processing and downloads -- API for integration with external scripts +- 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) @@ -32,52 +30,52 @@ Please feel free to submit feature requests or report bugs either through GitHub ### **Page Operations** - View and modify PDFs - View multi page PDFs with custom viewing sorting and searching. Plus on page edit features like annotate, draw and adding text and images. (Using PDF.js with Joxit and Liberation.Liberation fonts) -- Full interactive GUI for merging/splitting/rotating/moving PDFs and their pages. -- Merge multiple PDFs together into a single resultant file. -- Split PDFs into multiple files at specified page numbers or extract all pages as individual files. -- Reorganize PDF pages into different orders. -- Rotate PDFs in 90-degree increments. -- Remove pages. -- Multi-page layout (Format PDFs into a multi-paged page). -- Scale page contents size by set %. -- Adjust Contrast. -- Crop PDF. -- Auto Split PDF (With physically scanned page dividers). -- Extract page(s). -- Convert PDF to a single page. +- Full interactive GUI for merging/splitting/rotating/moving PDFs and their pages. +- Merge multiple PDFs together into a single resultant file. +- Split PDFs into multiple files at specified page numbers or extract all pages as individual files. +- Reorganize PDF pages into different orders. +- Rotate PDFs in 90-degree increments. +- Remove pages. +- Multi-page layout (Format PDFs into a multi-paged page). +- Scale page contents size by set %. +- Adjust Contrast. +- Crop PDF. +- Auto Split PDF (With physically scanned page dividers). +- Extract page(s). +- Convert PDF to a single page. ### **Conversion Operations** -- Convert PDFs to and from images. -- Convert any common file to PDF (using LibreOffice). -- Convert PDF to Word/Powerpoint/Others (using LibreOffice). -- Convert HTML to PDF. -- URL to PDF. -- Markdown to PDF. +- Convert PDFs to and from images. +- Convert any common file to PDF (using LibreOffice). +- Convert PDF to Word/Powerpoint/Others (using LibreOffice). +- Convert HTML to PDF. +- URL to PDF. +- Markdown to PDF. ### **Security & Permissions** -- Add and remove passwords. -- Change/set PDF Permissions. -- Add watermark(s). -- Certify/sign PDFs. -- Sanitize PDFs. -- Auto-redact text. +- Add and remove passwords. +- Change/set PDF Permissions. +- Add watermark(s). +- Certify/sign PDFs. +- Sanitize PDFs. +- Auto-redact text. ### **Other Operations** -- Add/Generate/Write signatures. -- Repair PDFs. -- Detect and remove blank pages. -- Compare 2 PDFs and show differences in text. -- Add images to PDFs. -- Compress PDFs to decrease their filesize (Using OCRMyPDF). -- Extract images from PDF. -- Extract images from Scans. -- Add page numbers. -- Auto rename file by detecting PDF header text. -- OCR on PDF (Using OCRMyPDF). -- PDF/A conversion (Using OCRMyPDF). -- Edit metadata. -- Flatten PDFs. -- Get all information on a PDF to view or export as JSON. +- Add/Generate/Write signatures. +- Repair PDFs. +- Detect and remove blank pages. +- Compare 2 PDFs and show differences in text. +- Add images to PDFs. +- Compress PDFs to decrease their filesize (Using OCRMyPDF). +- Extract images from PDF. +- Extract images from Scans. +- Add page numbers. +- Auto rename file by detecting PDF header text. +- OCR on PDF (Using OCRMyPDF). +- PDF/A conversion (Using OCRMyPDF). +- Edit metadata. +- Flatten PDFs. +- Get all information on a PDF to view or export as JSON. For a 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) @@ -118,10 +116,10 @@ docker run -d \ -e DOCKER_ENABLE_SECURITY=false \ --name stirling-pdf \ frooodle/s-pdf:latest - - + + Can also add these for customisation but are not required - + -v /location/of/customFiles:/customFiles \ ``` Docker Compose @@ -146,44 +144,9 @@ Note: Podman is CLI-compatible with Docker, so simply replace "docker" with "pod ## Enable OCR/Compression feature Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToUseOCR.md -## Want to add your own language? -Stirling PDF currently supports 26! -- English (English) (en_GB) -- English (US) (en_US) -- Arabic (العربية) (ar_AR) -- German (Deutsch) (de_DE) -- French (Français) (fr_FR) -- Spanish (Español) (es_ES) -- Simplified Chinese (简体中文) (zh_CN) -- Traditional Chinese (繁體中文) (zh_TW) -- 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) -- Dutch (Nederlands) (nl_NL) -- Greek (el_GR) -- Turkish (Türkçe) (tr_TR) -- Indonesia (Bahasa Indonesia) (id_ID) -- Hindi (हिंदी) (hi_IN) -- Hungarian (Magyar) (hu_HU) -- Bulgarian (Български) (bg_BG) -- Sebian Latin alphabet (Srpski) (sr-Latn-RS) - -If you want to add your own language to Stirling-PDF please refer -https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md - -And please create a PR to merge it back in so others can use it! - -## 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. +## Contributing (creating issues, translations, fixing bugs, etc.) +Please see our [Contributing Guide](CONTRIBUTING.md)! ## Customisation Stirling PDF allows easy customization of the app. @@ -243,9 +206,9 @@ For those wanting to use Stirling-PDFs backend API to link with their own custom ## Login authentication ![stirling-login](images/login-light.png) -### Prerequisites: +### Prerequisites: - User must have the folder ./configs volumed within docker so that it is retained during updates. -- Docker uses must download the security jar version by setting ``DOCKER_ENABLE_SECURITY`` to ``true`` in environment variables. +- Docker uses 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 via setting ``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 straight away (Recommended to remove them after user creation). @@ -266,10 +229,10 @@ For API usage you must provide a header with 'X-API-Key' and the associated API - 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 way) +- Redact text (Via UI not just automated way) - Add Forms -- Multi page layout (Stich PDF pages together) support x rows y columns and custom page sizing -- Fill forms mannual and automatic +- Multi page layout (Stich PDF pages together) support x rows y columns and custom page sizing +- Fill forms mannual and automatic ### Q2: Why is my application downloading .htm files? This is an issue caused commonly 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. From 00487275a71461849adb40369176b197fad35731 Mon Sep 17 00:00:00 2001 From: sbplat <71648843+sbplat@users.noreply.github.com> Date: Thu, 11 Jan 2024 17:38:05 -0500 Subject: [PATCH 2/2] docs: list supported languages in readme --- CONTRIBUTING.md | 28 ---------------------------- README.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f9902c41..3befe050 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,34 +25,6 @@ Please make sure your Pull Request adheres to the following guidelines: ## Translations -Stirling PDF currently supports 26! -- English (English) (en_GB) -- English (US) (en_US) -- Arabic (العربية) (ar_AR) -- German (Deutsch) (de_DE) -- French (Français) (fr_FR) -- Spanish (Español) (es_ES) -- Simplified Chinese (简体中文) (zh_CN) -- Traditional Chinese (繁體中文) (zh_TW) -- 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) -- Dutch (Nederlands) (nl_NL) -- Greek (el_GR) -- Turkish (Türkçe) (tr_TR) -- Indonesia (Bahasa Indonesia) (id_ID) -- Hindi (हिंदी) (hi_IN) -- Hungarian (Magyar) (hu_HU) -- Bulgarian (Български) (bg_BG) -- Sebian Latin alphabet (Srpski) (sr-Latn-RS) - If you would like to add or modify a translation, please see [How to add new languages to Stirling-PDF](HowToAddNewLanguage.md). Also, please create a Pull Request so others can use it! ## Fixing Bugs or Adding a New Feature diff --git a/README.md b/README.md index fa389cb0..da48ee05 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,36 @@ Note: Podman is CLI-compatible with Docker, so simply replace "docker" with "pod ## Enable OCR/Compression feature Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToUseOCR.md +## Supported Languages + +Stirling PDF currently supports 26! +- English (English) (en_GB) +- English (US) (en_US) +- Arabic (العربية) (ar_AR) +- German (Deutsch) (de_DE) +- French (Français) (fr_FR) +- Spanish (Español) (es_ES) +- Simplified Chinese (简体中文) (zh_CN) +- Traditional Chinese (繁體中文) (zh_TW) +- 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) +- Dutch (Nederlands) (nl_NL) +- Greek (el_GR) +- Turkish (Türkçe) (tr_TR) +- Indonesia (Bahasa Indonesia) (id_ID) +- Hindi (हिंदी) (hi_IN) +- Hungarian (Magyar) (hu_HU) +- Bulgarian (Български) (bg_BG) +- Sebian Latin alphabet (Srpski) (sr-Latn-RS) + ## Contributing (creating issues, translations, fixing bugs, etc.) Please see our [Contributing Guide](CONTRIBUTING.md)!