simonegosetto / pdf-parse-new

Pure javascript cross-platform module to extract texts from PDFs.
MIT License
5 stars 3 forks source link

Allow to pass options to pdf-parse-new to lower log level of pdf.js #2

Closed perki closed 3 weeks ago

perki commented 1 month ago

For some documents console is showing warning messages. exemple: Warning: TT: undefined function: 32

it would be nice to change the verbosity level of pdf.js which supports VERBOSITY_LEVELS

simonegosetto commented 1 month ago

@perki thanks for the tip,

let me know if version 1.2.4 works as expected

perki commented 1 month ago

@simonegosetto Thanks for the reactivity ..

The option is now present at "render_page" level, could you add it "parsing" level ? So we could set it simply at parsing?

const pdfParse = require('pdf-parse-new');
// ....
const pdfParsed = await pdfParse(dataBuffer, { verbosityLevel: 0 }); 
simonegosetto commented 3 weeks ago

@perki i'm working on it, i've already manage the verbosityLevel on parsing, but i would like to remove the multi-version mechanism and use the last version of pdf.js. i hope to finish in some days

simonegosetto commented 3 weeks ago

@perki let me know version 1.3.6 works as expected

perki commented 3 weeks ago

@simonegosetto Perfect 👍🏻 Thanks a lot!