Socket
Socket
Sign inDemoInstall

pdfoptim

Package Overview
Dependencies
126
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pdfoptim

Optimize file size of PDFs


Version published
Maintainers
1
Install size
1.34 MB
Created

Changelog

Source

[1.1.0] - 2019-04-24

Added

  • Log percentage difference instead of file size in bytes.

Fixed

  • Made error logging more robust.

Readme

Source

pdfoptim Build Status

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 © Rodrigo Bermudez Schettino

Keywords

FAQs

Last updated on 23 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc