JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28569
  • Score
    100M100P100Q147645F
  • License ISC

Convert PDF files into images using Poppler with promises. It achieves 10x faster performance compared to other PDF converters.

Package Exports

  • pdf-poppler

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-poppler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pdf-poppler

Convert PDF files into images using Poppler with promises. It achieves 10x faster performance compared to other PDF converters.

Note: Currently it works on Windows only.

Installation

  $ npm install pdf-poppler

Usage

const pdfpoppler = require('pdf-poppler');

let file = 'C:\\tmp\\convertme.pdf'

pdfpoppler.info(file)
    .then(pdfinfo => {
        console.log(pdfinfo);
    });
const path = require('path');
const pdfpoppler = require('pdf-poppler');

let file = 'C:\\tmp\\convertme.pdf'

let opts = {
    format: 'jpeg',
    out_dir: path.dirname(file),
    out_prefix: path.baseName(file, path.extname(file)),
    page: null
}

pdfpoppler.convert(file, opts)
    .then(res => {
        console.log('Successfully converted');
    })
    .catch(error => {
        console.error(error);
    })