pdfjs icon indicating copy to clipboard operation
pdfjs copied to clipboard

Error: Unsupported PNG filter 3

Open chrismorison-wt opened this issue 1 year ago • 1 comments

While adding an external pdf with new pdfjs.ExternalDocument(buffer); I am getting the error:

Error: Unsupported PNG filter 3
    at pngFilter (util.js:102:13)
    at exports.inflate (util.js:77:11)
    at PDFXref.parseXrefObject (xref.js:126:25)
    at PDFXref.parse (xref.js:74:19)
    at Parser.parse (parser.js:47:29)
    at new ExternalDocument (external.js:25:12)
    at generatePDF (generatePDF.ts:165:17)

Looking at util.js I see it only supports filter type 2. According to the PNG specification there are 4 filter types.

Is there any chance of getting filter type 3 supported - or all of them?

I'm sorry I cannot provide the pdf source file which is causing this issue due to confidentiality.

chrismorison-wt avatar Feb 06 '23 18:02 chrismorison-wt