Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

rodrigobdz/pdfoptim

Repository files navigation

pdfoptim

Optimize file size of PDFs

Install

$ npm install pdfoptim

Usage

const pdfoptim = require('pdfoptim');

pdfoptim('printer-manual.pdf');
// Filesize difference -79.46%
// Optimized version of printer-manual.pdf saved as optimized-1556039930343.pdf

API

pdfoptim(filePath, [options])

filePath

Type: string

Path to PDF file to optimize.

options

Type: Object

outputFile

Type: string
Default: optimized-{timestamp}.pdf

Filename for optimized PDF.

CLI

$ npm install --global pdfoptim
$ pdfoptim --help

Usage
pdfoptim [filePath]

Options
--outputFile File name for optimized PDF [Default: optimized-{timestamp}.pdf

Examples
$ pdfoptim essay.pdf
// Optimized PDF created with name optimized-[timestamp].pdf
$ pdfoptim -o optim-essay.pdf essay.pdf
// Optimized PDF created with name essay-optim.pdf

Credits

License

MIT (c) Rodrigo Bermudez Schettino

About

Optimize file size of PDFs

Topics

Resources

Readme

License

MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Stars

Watchers

Forks

Packages

Contributors