feat: add PDF password prompt and centralized pdf-lib loader with auto-repair

This commit is contained in:
alam00000
2026-03-26 14:42:48 +05:30
parent 9278774b8a
commit bd44108296
19 changed files with 89 additions and 78 deletions

View File

@@ -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();