Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unsupported PNG filter 3 #295

Open
chrismorison-wt opened this issue Feb 6, 2023 · 1 comment
Open

Error: Unsupported PNG filter 3 #295

chrismorison-wt opened this issue Feb 6, 2023 · 1 comment

Comments

@chrismorison-wt
Copy link

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.

@rkusa
Copy link
Owner

rkusa commented Feb 21, 2023

I am open to accept contributions adding them, but I am afraid that I am most probably not going to add them myself, as I haven't encountered any other PNGs than type 2 in my use-case of pdfjs. No need for the PDF source file in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants