[软件服务] PDF工具箱 - Stirling PDF

date
Mar 18, 2024
slug
setting-up-stirling-pdf-toolbox-guide
status
Published
summary
新软件-
tags
software
service
type
Post
notion image

Summary

安装过程

version: '3.3'
services:
  stirling-pdf:
    image: frooodle/s-pdf:latest
    container_name: stirling-pdf
#    ports:
#      - '8080:8080'
    volumes:
      - ./trainingData:/usr/share/tessdata #Required for extra OCR languages
      - ./extraConfigs:/configs
      - ./customFiles:/customFiles/
      - ./logs:/logs/
    environment:
            #- DOCKER_ENABLE_SECURITY=false
      - DOCKER_ENABLE_SECURITY=true
      - SECURITY_ENABLE_LOGIN=true
      - INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false
networks:
  default:
    name: npm_nginx_proxy_manager-network
    external: true

截图

我不是咕咕鸽


首页
/
Docker系列
/
正文
Docker系列
10分钟搭建一个PDF工具箱——Stirling PDF,满足你的所有PDF需求|好玩儿的Docker项目
咕咕
咕咕
2024-03-16
/
0 评论
/
1 点赞
/
1250 阅读
/
12472 字
温馨提示:
本文最后更新于 2024-03-18,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。
广告广告
日常办公的时候经常会用到 PDF,很多时候我们都需要对它进行一些处理操作,

比如添加水印(图片只是举个例子,这玩意儿不是我做的 = =):

106f5fc83d5c930d16570714e4eb3d38.png

这一期我们就来搭建一个免费开源的PDF处理项目——Stirling PDF 。一站式服务,满足你的所有PDF需求。

f97c6ff71800d45cc59cc43a61da0fa5.png

1. 介绍
这是一个强大的本地托管的基于docker的基于web的PDF操作工具,可以让你对PDF文件进行各种操作,如拆分、合并、转换、重新组织、添加图片、旋转、压缩等等。这个本地托管的web应用程序最初是由100%的ChatGPT制作的应用程序,并已发展成为包含各种功能以满足你所有的PDF需求。

Stirling PDF不会进行任何记录或跟踪。

所有文件和PDF文件要么仅存在于客户端,仅在任务执行期间驻留在服务器内存中,要么仅暂时驻留在文件中以执行任务。用户下载的任何文件在那时都已从服务器中删除。

特点:

支持暗黑模式
支持多种语言(包括简体和繁体中文)
有自定义下载选项(详情)
并行文件处理和下载
有与外部脚本集成的API
可选的登录和身份验证支持(详情)
支持自定义应用程序名称
支持自定义口号、图标、图片,甚至自定义HTML(通过文件覆盖)
2. 项目展示
Demo:https://pdf.gugu.ovh/

9448082adb86a24536da08d476dfbd7e.png

6919feaf162e76f2085a85dbab43568d.png

8dc8b723e591bb7898b402db402a386e.png

5fa24ad728e6d448450d4e3baa2790a4.png
469fbc4036e49ec3483debf7bca283fb.png
3. 相关地址
官方GitHub地址:https://github.com/Stirling-Tools/Stirling-PDF

4. 搭建环境
服务器:咕咕这边用的腾讯云轻量应用服务器,建议服务器内存1G以上,(也可以选择RackNerd的高性价比服务器一年100块钱不到)
系统:Debian 11DD 脚本 非必需 DD,用原来的系统也 OK,之后教程都是用 Debian 或者 Ubuntu 搭建~)
安装好 Docker、Docker-compose(相关脚本)
【必需】域名一枚,并做好解析到服务器上(域名购买、域名解析 视频教程)
【非必需】提前安装好宝塔面板海外版本 aapanel,并安装好 Nginx(安装地址)
【非必需本教程选用】安装好 Nginx Proxy Manager(相关教程)
5. 搭建视频(本周争取)
5.1 YouTube
视频地址:https://youtu.be/smc-6kAo7AM

5.2 哔哩哔哩
哔哩哔哩:https://www.bilibili.com/video/BV1xi421R7jb/

6. 搭建方式
如果你不是用的腾讯云的轻量应用服务器,可以直接跳到 6.1 部分。

安装系统(腾讯云轻量应用服务器)
e59713fba8726d3cb55ae11bca83fe3c.png
腾讯云轻量服务器最大的特点就是 “轻量”,相比 CVM,更适合小白上手,这边我们之间选择 Docker 基础镜像,就可以省去后面安装 Docker 的步骤 (如果你非要用国内的服务器,这边装的 Docker 镜像还会帮你配置好国内镜像源,让你加速访问 docker 镜像资源) 不建议用国内的 。

登陆(腾讯云轻量应用服务器)
2722040ee311eb4a9ebf2a4945bf38f4.png
c0b5d360053746c4095d592967ee401f.png
e0ba858f021b846ad0abc27acf5008c2.png
6.1 安装 Docker 与 Nginx Proxy Manager
可以直接参考这篇内容:

https://blog.laoda.de/archives/nginxproxymanager/

6.2 创建安装目录
创建一下安装的目录:

sudo -i

mkdir -p /root/data/docker_data/stirling_pdf

cd /root/data/docker_data/stirling_pdf
创建并编辑 docker-compose.yml文件

vim docker-compose.yml
填入下面的内容:

version: '3.3'
services:
  stirling-pdf:
    image: frooodle/s-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
DOCKER_ENABLE_SECURITY,这个默认就好,如果要开启用户登陆模式的话,再改成 true,具体可以参考:https://github.com/Stirling-Tools/Stirling-PDF 里的 Login authentication来设置,这边就默认 falseINSTALL_BOOK_AND_ADVANCED_HTML_OPS也是默认即可,这个是将calibre下载到stirling-pdf,以实现pdf到书籍和高级html转换用的,需要的可以打开
英文输入法下,按 i 修改,完成之后,按一下 esc,然后 :wq 保存退出。

6.3 打开服务器防火墙(非必需)并访问网页
打开防火墙的端口 8080

举例,腾讯云打开方法如下(部分服务商没有自带的面板防火墙,就不用这步操作了):

image-20220630215240864
image-20220630220546335
类似图中的,这边我们填 8080,示例填 stirling_pdf ,确定即可(如果你在 docker-compose 文件里换了 9009,这边就需要填 9009,以此类推)

56a42aff23098af08c1ae587e19739ae.png
查看端口是否被占用(以 8080 为例),输入:

lsof -i:8080  #查看 8080 端口是否被占用,如果被占用,重新自定义一个端口
如果啥也没出现,表示端口未被占用,我们可以继续下面的操作了~

如果出现:

-bash: lsof: command not found
运行:

apt install lsof  #安装 lsof
如果端口没有被占用(被占用了就修改一下端口,比如改成 8381,注意 docker 命令行里和防火墙都要改)

6.4 启动 stirling_pdf
cd /root/data/docker_data/stirling_pdf

docker compose up -d
等待拉取好镜像,出现 done的字样之后,

理论上我们就可以输入 http://ip:8080 访问了。

但是这边我们推荐先搞一下反向代理!

做反向代理前,你需要一个域名!

namesilo 上面 xyz 后缀的域名一年就 7 块钱,可以年抛。(冷知识,namesilo上 6位数字的xyz续费永远都是0.99美元 = =)

如果想要长期使用,还是建议买 com 后缀的域名,更加正规一些,可以输入 laodade 来获得 1 美元的优惠(不知道现在还有没有)

namesilo 自带隐私保护,咕咕一直在用这家,价格也是这些注册商里面比较低的,关键是他家不像其他家域名注册商,没有七七八八的套路!(就是后台界面有些丑 古老 = =)

【域名购买】Namesilo 优惠码和域名解析教程(附带服务器购买推荐和注意事项)

我们接着往下看!

7. 反向代理
7.1 利用 Nginx Proxy Manager
在添加反向代理之前,确保你已经完成了域名解析,不会的可以看这个:域名一枚,并做好解析到服务器上(域名购买、域名解析 视频教程)

image-20221016140213282
之后,登陆 Nginx Proxy Manager(不会的看这个:安装 Nginx Proxy Manager(相关教程))

注意:

Nginx Proxy Manager(以下简称 NPM)会用到 80443 端口,所以本机不能占用(比如原来就有 Nginx)

直接丢几张图:

80e348f9e664f4889c687769f804b820.png
3a41048b15ef7cde972b77e56a8df4fb.png
a73380ffa6098330f91fdcd69e9d5867.png
e7ca4be3b1341aaa6f650033c17f8db5.png
注意填写对应的 域名、IP 和 端口,按文章来的话,应该是 8080

IP 填写:

如果 Nginx Proxy Manager 和 stirling pdf 在同一台服务器上,可以在终端输入:

ip addr show docker0
查看对应的 Docker 容器内部 IP。


否则直接填 stirling pdf 所在的服务器 IP 就行。

7.2 利用宝塔面板
发现还是有不少小伙伴习惯用宝塔面板,这边也贴一个宝塔面板的反代配置:

直接新建一个站点,不要数据库,不要 php,纯静态即可。

然后打开下面的配置,修改 Nginx 的配置。

image-20220819150345725
image-20220819150542867
代码如下:

location / {
      proxy_pass http://127.0.0.1:8080/;       # 注意改成你实际使用的端口
      rewrite ^/(.*)$ /$1 break;
      proxy_redirect off;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Upgrade-Insecure-Requests 1;
      proxy_set_header X-Forwarded-Proto https;
    }
此方法对 90% 的反向代理都能生效,然后就可以用域名来安装访问了。

有同学可能会问,为什么不直接用宝塔自带的反向代理功能。

image-20220819150730128
也可以,不过咕咕自己之前遇到过当有多个网站需要反代的时候,在这边设置会报错的情况 = =

所以后来就不用了,直接用上面的方法来操作了。

8. 使用教程
建议参考视频,或者自己尝试一下。

8.1 更新 stirling_pdf
cd /root/data/docker_data/stirling_pdf

docker-compose pull

docker-compose up -d    # 请不要使用 docker-compose stop 来停止容器,因为这么做需要额外的时间等待容器停止;docker-compose up -d 直接升级容器时会自动停止并立刻重建新的容器,完全没有必要浪费那些时间。

docker image prune  # prune 命令用来删除不再使用的 docker 对象。删除所有未被 tag 标记和未被容器使用的镜像
提示:

WARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N]
输入 y

利用 Docker 搭建的应用,更新非常容易~

8.2 卸载 stirling_pdf
同样进入安装页面,先停止所有容器。

cd /root/data/docker_data/stirling_pdf

docker-compose down

cd ..

rm -rf /root/data/docker_data/stirling_pdf  # 完全删除
可以卸载得很干净。

9. 常见问题及注意点
1、为什么我的下载超时了

NGINX默认具有超时值,因此如果您在NGINX后面运行Stirling-PDF,则可能需要设置超时值,例如添加配置 proxy_read_timeout 3600;

2、为什么我的应用程序正在下载 .htm文件?

这通常是由您的NGINX配置引起的问题。NGINX的默认文件上传大小为1MB,您需要在Nginx的sites-available文件中添加以下内容。

client_max_body_size SIZE;

其中"SIZE"可以是50M,例如用于50MB的文件。

类似:

3b4d9cea8f6b3960bfca20bfed49201d.png
其他大家评论区交流。

10. 结尾
祝大家用得开心,有问题可以去 GitHub 提 Issues,也可以在评论区互相交流探讨。

同时,有能力给项目做贡献的同学,也欢迎积极加入到 项目 中来,贡献自己的一份力量!

最后,感谢开发人员们的辛苦付出,让我们能用到这么优秀的项目!

参考资料
https://github.com/Stirling-Tools/Stirling-PDF

PDF工具
 版权归属: 咕咕
 本文链接: https://blog.laoda.de/archives/docker-compose-install-stirling-pdf
 许可协议: 本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
广告广告


上一篇
下一篇
评论区
博主栏壁纸
咕咕博主等级
折腾起来!

8
分类数
242
文章数
24
评论数
文章目录
相关文章
腾讯会议替代品!10分钟搭建一个开源视频会议项目——Jitsi | 好玩儿的Docker项目
【好玩儿的Docker项目】搭建属于自己的个人相册——PhotoPrism
【好玩儿的Docker项目】10分钟搭建带提醒的个人订阅追踪器——Wallos!VPS、云服务续费时间,续费金额,一目了然!
【好玩儿的Docker项目】特斯拉(Tesla)车友必备!带可视化面板!10分钟搭建TeslaMate——一个强大的特斯拉数据记录器!|Grafana数据可视化
广告广告
2024 ©我不是咕咕鸽

Powered by Halo | 🌈 Theme byM酷&Jiewen

本站点由 云服务商 提供云服务

已运行 1295104415RSS 站点地图
❤


Skip to content
Stirling-Tools
/
Stirling-PDF

Type / to search

Code
Issues
131
Pull requests
2
Discussions
Actions
Projects
2
Security
Insights
Owner avatar
Stirling-PDF
Public
Stirling-Tools/Stirling-PDF
Go to file
t
Add file
Folders and files
Name		
Latest commit
albanobattistella
albanobattistella
Update messages_it_IT.properties (#927)
4a3326a
 · 
yesterday
History
.github
Frooodle patch 2 (#913)
5 days ago
chart/stirling-pdf
Number of fixes and making pipline LIVE ! (#907)
5 days ago
docs
refactor: normalize files
last month
exampleYmlFiles
Fix typo in example yaml file (#922)
2 days ago
gradle/wrapper
Add files via upload
last year
images
redact allow colors, bug fixes
7 months ago
pipeline/defaultWebUIConfigs
Added option to split PDF into multiple parts and merge into one PDF (#…
3 weeks ago
scripts
dep bumps and nonroot bypass (#910)
5 days ago
src
Update messages_it_IT.properties (#927)
yesterday
.git-blame-ignore-revs
misc: update .git-blame-ignore-revs to ignore normalize files commi…
last month
.gitattributes
Update .gitattributes
2 months ago
.gitignore
refactor: normalize files
last month
.pre-commit-config.yaml
🔨 add Developer tools/scripts (#828)
5 days ago
CONTRIBUTING.md
docs: list supported languages in readme
2 months ago
Dockerfile
fixes for user permissions (#892)
last week
Dockerfile-lite
fixes for user permissions (#892)
last week
Dockerfile-ultra-lite
fixes for user permissions (#892)
last week
Endpoint-groups.md
refactor: normalize files
last month
FolderScanning.md
lang, save to browser (#923)
yesterday
HowToAddNewLanguage.md
Document (#803)
last month
HowToUseOCR.md
chore: fix some typos (#900)
last week
Jenkinsfile
refactor: normalize files
last month
LICENSE
Update LICENSE
10 months ago
LocalRunGuide.md
Document (#803)
last month
PipelineFeature.md
lang, save to browser (#923)
yesterday
README.md
non root user and fix book/html calibre (#856)
2 weeks ago
Version-groups.md
refactor: normalize files
last month
build.gradle
Bump com.google.zxing:core from 3.5.2 to 3.5.3 (#779)
4 days ago
gradlew
Make ./gradlew executable; accept .java files improvements after runn…
2 months ago
gradlew.bat
refactor: normalize files
last month
lauch4jConfig.xml
Upload jar and .exe to release
9 months ago
settings.gradle
Rename app to Stirling-PDF not S-pdf
9 months ago
test.sh
fixes for user permissions (#892)
last week
test2.sh
Number of fixes and making pipline LIVE ! (#907)
5 days ago
Repository files navigation
README
GPL-3.0 license


Stirling-PDF
Docker Pulls Discord Docker Image Version (tag latest semver) GitHub Repo stars Paypal Donate Github Sponsor

Deploy to DO

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 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.

stirling-home

Features
Dark mode support.
Custom download options (see here for example)
Parallel file processing and downloads
API for integration with external scripts
Optional Login and Authentication support (see here for documentation)
PDF Features
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.
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.
Security & Permissions
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.
For a overview of the tasks and the technology each uses please view Endpoint-groups.md Demo of the app is available here. username: demo, password: demo

Technologies used
Spring Boot + Thymeleaf
PDFBox
LibreOffice for advanced conversions
OcrMyPdf
HTML, CSS, JavaScript
Docker
PDF.js
PDF-LIB.js
How to use
Locally
Please view https://github.com/Stirling-Tools/Stirling-PDF/blob/main/LocalRunGuide.md

Docker / Podman
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 don't mind about space optimization just use the 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/tessdata \
  -v /location/of/extraConfigs:/configs \
  -v /location/of/logs:/logs \
  -e DOCKER_ENABLE_SECURITY=false \
  -e INSTALL_BOOK_AND_ADVANCED_HTML_OPS=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

version: '3.3'
services:
  stirling-pdf:
    image: frooodle/s-pdf:latest
    ports:
      - '8080:8080'
    volumes:
      - /location/of/trainingData:/usr/share/tessdata #Required for extra OCR languages
      - /location/of/extraConfigs:/configs
#      - /location/of/customFiles:/customFiles/
#      - /location/of/logs:/logs/
    environment:
      - DOCKER_ENABLE_SECURITY=false
      - INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false
Note: Podman is CLI-compatible with Docker, so simply replace "docker" with "podman".

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!

Customisation
Stirling PDF allows easy customization of the app. Includes things like

Custom application name
Custom slogans, icons, images, and even custom HTML (via file overrides)
There are two options for this, either using the generated settings file settings.yml This file is located in the /configs directory and follows standard YAML formatting

Environment variables are also supported and would override the settings file For example in the settings.yml you have

system:
  defaultLocale: 'en-US'
To have this via an environment variable you would have SYSTEM_DEFAULTLOCALE

The Current list of settings is

security:
  enableLogin: false # set to 'true' to enable login
  csrfDisabled: true

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
  customStaticFilePath: '/customFiles/static/' # Directory path for custom static files

#ui:
#  appName: exampleAppName # Application's visible name
#  homeDescription: I am a description # Short description or tagline shown on homepage.
#  appNameNavbar: navbarName # 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 endpoints (view http://localhost:8080/swagger-ui/index.html#/API to learn more), 'false' to disable
Extra notes
Endpoints. Currently, the endpoints ENDPOINTS_TO_REMOVE and GROUPS_TO_REMOVE can include comma separate 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
customStaticFilePath. Customise static files such as the app logo by placing files in the /customFiles/static/ directory. An example of customising app logo is placing a /customFiles/static/favicon.svg to override current SVG. This can be used to change any images/icons/css/fonts/js etc in Stirling-PDF
Environment only parameters
SYSTEM_ROOTURIPATH ie set to /pdf-app to Set the application's root URI to localhost:8080/pdf-app
SYSTEM_CONNECTIONTIMEOUTMINUTES to set custom connection timeout values
DOCKER_ENABLE_SECURITY to tell docker to download security jar (required as true for auth login)
INSTALL_BOOK_AND_ADVANCED_HTML_OPS to download calibre onto stirling-pdf enabling pdf to/from book and advanced html conversion
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 (Or by following the API button in your settings of Stirling-PDF)

Login authentication
stirling-login

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.
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).
Once the above has been done, on restart, a new stirling-pdf-DB.mv.db will show if everything worked.

When you login to Stirling PDF you will be redirected to /login page to login 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 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 which will be expanding on more in 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 way)
Add Forms
Multi page layout (Stich 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?
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.

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;

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

Topics
java docker pdf pdf-converter pdf-manipulation pdfmerger pdf-merger pdf-tools pdf-web-apps pdf-ocr
Resources
 Readme
License
 GPL-3.0 license
 Activity
 Custom properties
Stars
 18.7k stars
Watchers
 70 watching
Forks
 1.3k forks
Report repository
Releases 59
v0.22.3 Pipeline out of alpha
Latest
yesterday
+ 58 releases
Sponsor this project
@Frooodle
Frooodle Anthony Stirling
https://paypal.me/froodleplex?country.x=GB&locale.x=en_GB
Learn more about GitHub Sponsors
Packages
1
s-pdf
Contributors
97
@Frooodle
@sbplat
@Sf298
@dependabot[bot]
@DimK10
@Ludy87
@jordyjordy
@NeilJared
@albanobattistella
@pixeebot
@trytomakeyouprivate
@aancw
@omerbustun
@pl4nty
+ 83 contributors
Deployments
495
 github-pages yesterday
+ 494 deployments
Languages
Java
54.7%
 
HTML
31.2%
 
JavaScript
9.5%
 
CSS
2.6%
 
Shell
1.1%
 
Python
0.4%
 
Other
0.5%
Footer
© 2024 GitHub, Inc.
Footer navigation
Terms
Privacy
Security
Status
Docs
Contact
Manage cookies
Do not share my personal information
Stirling-Tools/Stirling-PDF: locally hosted web application that allows you to perform various operations on PDF files
 

© Ying Bun 2021 - 2024