当前位置:   article > 正文

Docker 部署 stirling-pdf 组件_stirling-tools/stirling-pdf[1]

stirling-tools/stirling-pdf[1]

项目地址:https://github.com/Stirling-Tools/Stirling-PDF


一.文件目录信息

customFiles是自定义样式,把static文件夹放在customFiles中

/data/mixos/assembly/stirling-pdf/customFiles/static/css

删除不需要的图标和样式:每个css类中增加下方代码

  1. #footer{
  2. display: none;
  3. }
  4. #languageDropdown{
  5. display:none;
  6. width:0px;
  7. height:0px;
  8. }

二.配置文件信息

  1. cd /data/mixos/assembly/stirling-pdf/configs
  2. vim settings.yml

settings.yml:

  1. # Welcome to settings file
  2. # Remove comment marker # if on start of line to enable the configuration
  3. # If you want to override with environment parameter follow parameter naming SECURITY_INITIALLOGIN_USERNAME
  4. security:
  5. enableLogin: false # set to 'true' to enable login
  6. csrfDisabled: true
  7. loginAttemptCount: 5 # lock user account after 5 tries
  8. loginResetTimeMinutes : 120 # lock account for 2 hours after x attempts
  9. system:
  10. defaultLocale: 'zh-CN' # Set the default language (e.g. 'de-DE', 'fr-FR', etc)
  11. googlevisibility: false # 'true' to allow Google visibility (via robots.txt), 'false' to disallow
  12. enableAlphaFunctionality: false # Set to enable functionality which might need more testing before it fully goes live (This feature might make no changes)
  13. customApplications:
  14. installBookFormats: false # Installs Calibre for book format conversion (For non docker it must be manually downloaded but will need to be true to show in UI)
  15. installAdvancedHtmlToPDF: false # DO NOT USE EXTERNALLY, NOT SAFE! Install wkHtmlToPDF (For non docker it must be manually downloaded but will need to be true to show in UI)
  16. #ui:
  17. # appName: exampleAppName # Application's visible name
  18. # homeDescription: I am a description # Short description or tagline shown on homepage.
  19. # appNameNavbar: navbarName # Name displayed on the navigation bar
  20. ui:
  21. appName: 创变
  22. homeDescription: PDF一站式服务,满足您的所有PDF需求。 # Short description or tagline shown on homepage.
  23. endpoints:
  24. toRemove: [] # List endpoints to disable (e.g. ['img-to-pdf', 'remove-pages'])
  25. groupsToRemove: [] # List groups to disable (e.g. ['LibreOffice'])
  26. metrics:
  27. enabled: true # 'true' to enable Info APIs (`/api/*`) endpoints, 'false' to disable
  28. customStaticFilePath: '/customFiles/static/' # Directory path for custom static files
  29. AutomaticallyGenerated:
  30. key: 6d321144-c0e6-4888-801d-b9e013086eae

三.部署命令

  1. docker pull frooodle/s-pdf:latest
  2. docker run -d -p 8908:8080 -v /data/mixos/assembly/stirling-pdf/data/:/usr/share/tesseract-ocr/4.00/tessdata -v /data/mixos/assembly/stirling-pdf/configs/:/configs -v /data/mixos/assembly/stirling-pdf/customFiles:/customFiles -e DOCKER_ENABLE_SECURITY=false -e SYSTEM_ROOTURIPATH=/stirlingpdf --name stirlingpdf frooodle/s-pdf
  3. 访问地址:http://10.30.0.29:8908

  1. location /stirlingpdf {
  2. proxy_pass http://10.30.0.29:8908/stirlingpdf;
  3. }

四.其他配置

1. 修改app名称和描述:

  1. vim /data/mixos/assembly/stirling-pdf/configs/settings.yml
  2. ui:
  3. appName: 创变
  4. homeDescription: PDF一站式服务,满足您的所有PDF需求。 # Short description or tagline shown on homepage.

2. 自定义图标:将static中的选中图片按尺寸切好后覆盖即可

3. 图标设置圆角:/static/css/navbar.css添加代码

  1. .main-icon {
  2. border-radius: 40%;
  3. }

4. 浏览pdf功能去掉顶部的小图标以及字样:/static/pdfjs/css/viewer.css 添加代码

  1. .main-icon {
  2. display: none;
  3. }
  4. [class~="icon-text"] {
  5. display: none;
  6. }

5. 删除“浏览pdf”功能:/static/css/home.css 添加代码

  1. #view-pdf{
  2. display: none;
  3. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/525556
推荐阅读
相关标签
  

闽ICP备14008679号