feat: add PDF password prompt and centralized pdf-lib loader with auto-repair
This commit is contained in:
@@ -229,9 +229,7 @@ async function updateUI() {
|
||||
showLoader('Loading PDF...');
|
||||
result.pdf.destroy();
|
||||
pageState.file = result.file;
|
||||
pageState.pdfDoc = await loadPdfDocument(result.bytes, {
|
||||
throwOnInvalidObject: false,
|
||||
});
|
||||
pageState.pdfDoc = await loadPdfDocument(result.bytes);
|
||||
hideLoader();
|
||||
|
||||
const pageCount = pageState.pdfDoc.getPageCount();
|
||||
|
||||
Reference in New Issue
Block a user