We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88f2ab1 commit ae8bf18Copy full SHA for ae8bf18
apps/OpenSign/src/pages/DebugPdf.js
@@ -74,7 +74,7 @@ const DebugPdf = () => {
74
75
const inferPdfType = async (pdf) => {
76
try {
77
- const firstPage = await pdf.getPage(2);
+ const firstPage = await pdf.getPage(pdf?.numPages > 1 ? 2 : 1);
78
const scale = 1;
79
const { width, height } = firstPage.getViewport({ scale });
80
setPdfDimension({ width: width, height: height });
0 commit comments