JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 117
  • Score
    100M100P100Q81093F
  • License MIT

Compress pdf files right in browser

Package Exports

  • pdf-compressor
  • pdf-compressor/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pdf-compressor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

PDF compressor

Compress pdf and img in browser.

Installation

npm i pdf-compressor
yarn add pdf-compressor
pnpm add pdf-compressor
bun add pdf-compressor

Usage

// just send to the function file and options (optional)
const compressedFile = await compressPDF(file, {
    quality: 0.98, // from 0 to 1
    scale: 1, // which times to scale from original size
});

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Authors

This project based on @tt-p's project, so thanks for the key idea