fix(pdf): stop page tools failing on short and encrypted PDFs (#594)

Empty the hardcoded page-range default in remove/split/extract PDF tools (remove-pages defaulted to "2,4-6", out of range for any PDF under 6 pages) and disable submit until a range is entered. Reject password-protected PDFs up front for PDF-only tools with guidance to unlock first, instead of failing cryptically in the qpdf worker. Adds integration + e2e coverage.
This commit is contained in:
SnapOtter
2026-07-21 06:14:43 +00:00
committed by GitHub
parent 4ba7503f15
commit 73df107758
11 changed files with 173 additions and 9 deletions
+1 -1
View File
@@ -1948,7 +1948,7 @@ test.describe("DOCUMENT: split-pdf", () => {
}) => {
const issues = instrument(page);
await setupTool(page, "split-pdf", PDF_3PAGE);
// Default mode is range, range="1-3,5"
// Default mode is range; the range box starts empty (placeholder "1-3,5")
await fillInput(page, "sp-range", "1-2");
const dl = await processAndDownload(page, "split-pdf", "long");
if (!dl.ok) {