Skip to content

Commit

Permalink
Add cleanpdf microservice
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Feb 5, 2025
1 parent 350f010 commit d67c846
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/cleanpdf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG TAG=main
ARG DOCKER_REPOSITORY=lehighlts
FROM ${DOCKER_REPOSITORY}/scyllaridae:${TAG}

RUN apk update && \
apk add --no-cache \
ghostscript==10.04.0-r0

COPY . /app
3 changes: 3 additions & 0 deletions examples/cleanpdf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# cleanpdf

if your PDF doesn't render correctly in a pdf.js viewer (e.g. it has XFA or AcroForms embedded) you can try running it through this service.
17 changes: 17 additions & 0 deletions examples/cleanpdf/scyllaridae.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allowedMimeTypes:
- "application/pdf"
cmdByMimeType:
default:
cmd: gs
args:
- "-o"
- "-"
- "-sDEVICE=pdfwrite"
- "dPDFSETTINGS=/prepress"
- "dNOPAUSE"
- "dBATCH"
- "dQUIET"
- "dNoOutputFonts"
- "-dDetectDuplicateImages"
- "-dPrinted"
- "-"

0 comments on commit d67c846

Please sign in to comment.