All-in-one PDF processor: merge multiple PDFs, split by page ranges, compress file size, extract text, OCR scanned documents (Tesseract), add text watermarks, rotate pages, and read metadata. Accepts PDF URLs or Key-Value Store keys.
Transient DNS resolution failures during downloads are retried within downloadRetries instead of failing the input on the first attempt. Production evidence: a resolvable PDF host reported DOWNLOAD_FAILED in some runs while the same host succeeded in others, and a single such input aborts an entire merge batch. Safety, size and format violations still fail immediately without retry.
Unexpected processing/storage failures now log the full traceback to the run log (Input 2 failed unexpectedly (RuntimeError)). Dataset records keep the generic, secret-free PROCESSING_FAILED message, so shared datasets stay clean while the cause becomes diagnosable.
Observability
Multi-input runs update the run status message with live progress (Processed 2/10 inputs, 2 OK) and an initial Processing 10 input(s): merge message, instead of only reporting a final summary.
New tests: test_transient_dns_failure_is_retried and test_permanent_download_errors_are_not_retried lock in the retry boundaries.
Unreleased — 2026-09-14
Correctness and reliability
TXT outputs use the exact text/plain content type required by the remote Key-Value Store schema (local emulators do not enforce collection content types).
OCR uses one-based page numbers. Page failures propagate to record and run summaries.
Split handles every PDF and assigns collision-free chunk/ZIP names.
Merge refuses missing or invalid sources instead of quietly merging a subset.
Strict page ranges reject invalid selections instead of clipping or skipping pages.
Rotation and watermarking retain document metadata, bookmarks and ordinary form fields.
Watermarks use a Unicode font, respect zero angle/opacity, support page selection and handle rotated crop boxes.
Invalid metadata dates become warnings rather than failing the entire metadata operation.
Workflow improvements
Password-protected input PDFs and input records from an existing Key-Value Store.
OCR fallback for text extraction, configurable DPI, subprocess timeouts and page limits.
Full per-page JSON output alongside TXT, optional compact dataset records.
File URLs, exact byte sizes, SHA-256 hashes, typed errors and a run SUMMARY record.
Streaming size limits, bounded file pipelines, retry handling and public-address-only downloads with pinned DNS resolution.
Tests for PDF content, forms, metadata, OCR, failures, resource bounds, downloads and real SDK storage.
Updated PDF dependencies and explicit production font installation.
Compatibility notes
Custom filenames now retain the operation prefix and original input index so Apify file collections include them. Read outputKey from results instead of constructing it.
Input strings separate URLs on newlines, not commas. Commas in URL paths/signatures are preserved.
Compression preserves metadata unless stripMetadata: true. High compression no longer implies linearization; linearization is not a size optimization.
Invalid/out-of-bounds page ranges and incomplete merges now fail explicitly.
All-input failure marks the Apify run failed. Mixed batches retain results; failOnError optionally fails the run on partial errors.
Query strings and fragments are removed from inputFile; use inputIndex to map back to the input.
Text processing produces an additional JSON file. Split ZIP mode also creates archives for one-page results.
Default resource limits: 100 sources, 25 MiB per file, 100 MiB per batch, 500 pages per PDF and 100 OCR pages per input. Configurable within documented bounds.
No live Actor, pricing, Store metadata or production deployment is changed by these local files.