Skip to content

Commit

Permalink
Fix issue for single page PDFs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed May 28, 2024
1 parent 4884d58 commit 97a8acd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/module/content-rect.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function getContentRect(pdfDocument, structuredCharsProvider) {
}
}

let { view } = await pdfDocument.getPage(1);
let { view } = await pdfDocument.getPage(numPages === 2 ? 1 : 0);
let width = view[2] - view[0];
rect[0] = 0;
rect[2] = width;
Expand Down

0 comments on commit 97a8acd

Please sign in to comment.