feat: enable loading of encrypted PDFs by adding ignoreEncryption option

This commit is contained in:
alam00000
2026-03-26 12:55:50 +05:30
parent 816dc311ae
commit 9d362b1cf8
24 changed files with 56 additions and 17 deletions

View File

@@ -150,7 +150,9 @@ async function removeMetadata() {
if (loaderModal) loaderModal.classList.remove('hidden');
if (loaderText) loaderText.textContent = 'Removing all metadata...';
result.pdf.destroy();
const pdfDoc = await PDFDocument.load(result.bytes);
const pdfDoc = await PDFDocument.load(result.bytes, {
ignoreEncryption: true,
});
removeMetadataFromDoc(pdfDoc);