Golang based PDF compress which uses Ghostscript to compress PDF
607
docker pull thebinij/pdf-compressor:latest
docker run -p 8080:8080 thebinij/pdf-compressor:latest
Description: This endpoint returns a simple "pong!" response to check if the server is up and running.
Endpoint URL: http://localhost:8080/ping
Response: pong!
curl -X GET http://localhost:8080/ping
Pong!
Description: This endpoint accepts a PDF file as a form data field named pdfFile and compresses the PDF while preserving its content and quality.
Endpoint URL: http://localhost:8080/compress-pdf
Request Body: Multipart form data with the following fields:
pdf_file (required): The PDF file to be compressed.dpi (optional): The DPI (dots per inch) value for the compression (e.g., 90).grayscale (optional): Set to true to convert the PDF to grayscale.Response: The compressed PDF file will be returned as a download.
curl -X POST -F "[email protected]" -F "dpi=90" -F "grayscale=true" http://localhost:8080/compress-pdf --output compressed_example.pdf
Content type
Image
Digest
sha256:fe1d74e64…
Size
32 MB
Last updated
about 3 years ago
docker pull thebinij/pdf-compressor