Fdawgs / node-poppler

Asynchronous node.js wrapper for the Poppler PDF rendering library
https://npmjs.com/package/node-poppler
MIT License
185 stars 25 forks source link

Allow for each function's bin path to be seperately defined #572

Open Fdawgs opened 8 months ago

Fdawgs commented 8 months ago

Prerequisites

Description

At present, all functions use the popplerPath property for their bin path.

This should be broken down to an individual level so that it can be modified if needs be:


const { Poppler } = require('node-poppler');

const poppler = new Poppler('/usr/bin');

poppler.pdfToTextPath = '/totallydifferentpath/bin';
poppler.pdfToHtmlPath = '/anotherpath';

await poppler.pdfToText(new Buffer('bleh'));