Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 971 Bytes

Readme.md

File metadata and controls

30 lines (19 loc) · 971 Bytes

Ghostscript-pdf-compress.wasm

Context

This project takes any PDF and compresses it locally in your browser via ghostscript. This fork builds on the work of laurentmmeyer but uses the gs.wasm compiled by ghostpdl-wasm.

The applied command is:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Run the project

To run the project, simply do the following steps

git clone https://github.com/jkrimmer/ghostscript-pdf-compress.wasm
cd ghostscript-pdf-compress.wasm
yarn
yarn dev

Demo

https://laurentmmeyer.github.io/ghostscript-pdf-compress.wasm/

Blog

laurentmmeyer wrote a post about the process.