mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user