Skip to content

jkrimmer/ghostscript-pdf-compress.wasm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A short demo of how to compress PDF in the browser with ghostscript in WASM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.8%
  • CSS 2.8%
  • HTML 0.4%