mirror of
https://github.com/karant-dev/AutoRedact.git
synced 2026-04-26 00:05:52 +03:00
[GH-ISSUE #23] feat(cli): Add PDF Support #6
Labels
No labels
bug
enhancement
enhancement
enhancement
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AutoRedact#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @karant-dev on GitHub (Dec 13, 2025).
Original GitHub issue: https://github.com/karant-dev/AutoRedact/issues/23
Context
CLI PDF support was attempted in v2.0 (PR #22) but blocked due to technical limitations in the Node.js ecosystem. Currently, the CLI only supports
.jpgand.png.Technical Blockers
pdfjs-distvsnode-canvas: The standard PDF.js library requires a comprehensive DOM implementation (specificallyPath2DandDOMMatrix) to render PDFs.node-canvasdoes not fully implementPath2D, causingpdfjs-dist(both Legacy and Modern builds) to crash withReferenceError: Path2D is not defined.window,document, andCanvasglobals failed to resolve the rendering context incompatibility.pdf-img-convertfailed to install due tonode-pre-gypcompilation errors on modern Node versions.Proposed Solutions
pdftoppm(part ofpoppler-utils) viachild_process. This is robust but adds system dependencies.node-canvasto implementPath2D.Current Workaround
Users are advised to convert PDFs to images manually before processing with the CLI.