Error while calling instance.printInBackground

Hi,

Code is simple:
instance.printInBackground({
includeComments: false,
includeAnnotations: true,
pagesToPrint: list,
});

Error Message:
Uncaught RangeError: offset is out of bounds
at Uint8ClampedArray.set ()
at r$jscomp$0 (PDFJSDocumentType.js:2210)

There are [page number] times error Messgae shown in the console.

The resolution of the pdf file is high.(100% scale result in just a small area of the page).
Other pdf files can’t reproduce this.

Thanks for any messages,
Ken

Hey there,

Are you able to share the document with me for testing?

Thanks,
Logan

Hi,

The document includes some private information. So I will try to reproduce with some other documents and share with you.

FYI, no errors show in console only when print quality is 1.

Thanks for replying,
Ken

Hi Logan,

I have attached a file having this issue. Please help find out the solution :slight_smile:

Thanks,
Ken

H0d525e77765b425fa09827a3d5d32fc8M.pdf (93.5 KB)

Hey there,

Thanks for the document, I can reproduce the issue when setting the print quality to 3.

I will investigate and get back to you when we have a solution. We will have to push a new release to fix this one.

For now, I recommend not setting the print quality so high.

Thanks!
Logan

1 Like