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

Page height has an error instead value #109

Open
Bonn2018 opened this issue Dec 1, 2023 · 1 comment
Open

Page height has an error instead value #109

Bonn2018 opened this issue Dec 1, 2023 · 1 comment
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@Bonn2018
Copy link
Collaborator

Bonn2018 commented Dec 1, 2023

Acme corp.pdf

Code for reproduce:

function findError(doc: ArrayBuffer) {
 const doc =  PDFDoc.PDFDocument.load(doc, {});
 const page = doc.pages.get(0);

return page.height
}

Expect: Some number which equal to page height
Current result:

RangeError: Array index is out of bounds at PDFRectangle.get (http://localhost:3001/assets/js/crypto.worker.js:17236:19) at get height [as height] (http://localhost:3001/assets/js/crypto.worker.js:32027:37) at PDFPage.invokeGetter (<anonymous>:3:28) at getViewport (http://localhost:3001/assets/js/crypto.worker.js:147629:28)
@Bonn2018 Bonn2018 added the bug Something isn't working label Dec 1, 2023
@Romashine
Copy link
Contributor

When I try to open a document, it breaks while reading the XRef Table. The problem has been fixed in PR <link>. I can't reproduce the problem with getting page height described in this ticket

@Romashine Romashine added the question Further information is requested label Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants