fix: not able draw boxes in debug ui on single page pdf

This commit is contained in:
prafull-opensignlabs
2024-09-24 12:37:50 +05:30
parent 88f2ab1f8e
commit ae8bf187c8
+1 -1
View File
@@ -74,7 +74,7 @@ const DebugPdf = () => {
const inferPdfType = async (pdf) => {
try {
const firstPage = await pdf.getPage(2);
const firstPage = await pdf.getPage(pdf?.numPages > 1 ? 2 : 1);
const scale = 1;
const { width, height } = firstPage.getViewport({ scale });
setPdfDimension({ width: width, height: height });