theseus/bundled-addons/pdf-editor/vendor/pdfjs/web/images/comment-editButton.svg

9 lines
908 B
XML
Raw Normal View History

feat(pdf-editor): read, mark up and reshape a PDF without leaving the browser A PDF that needs a signature, a highlight or a page removed currently sends the user out to a desktop application or, worse, to a web service that wants the document uploaded first. Both are poor answers for a browser whose point is that nothing has to leave the machine. This is a full-tab editor that opens a PDF, marks it up, fills its forms and saves a new copy, entirely locally. Two engines, vendored rather than installed, because an add-on ships as a self-contained folder over the signed update channel and nothing runs a package manager on the way: pdf.js reads and renders, pdf-lib writes. They share no state. Everything in between lives in PDF user space — points, origin bottom-left — which is the one coordinate vocabulary both speak, so a mark survives zooming, rotating and reordering with no conversion table and save-time needs to know nothing about how a page happened to be displayed. The page strip is built from pdf.js's PDFPageView components rather than its PDFViewer, which renders pages in the file's own order and cannot hide, reorder or individually rotate one — three of the features here. Text layers are ours and stay attached for every page, drawn or not, because Theseus's find bar is Chromium's findInPage over the live DOM and a torn-down text layer is a page Ctrl+F cannot see. Canvases are virtualised; a letter page at 100% is 3.4 MB of bitmap. Redaction is the part worth being careful about. A black box over text hides nothing — the text stays in the content stream and comes straight out of a copy-paste — so the editor says so in a modal before the tool can be used, and on save rebuilds each redacted page as an image, which genuinely removes it. Pages that were not redacted are untouched. Form widgets and links are kept, since they were never the leak. Saving never writes over the original: every save reloads the source bytes and replays the session onto a fresh copy, so a botched save cannot poison the next one. Out of scope for this first version: editing the text that is already in the document, and writing XFA forms back (pdf-lib cannot, so those are fill-and- print only, and the editor says so on open).
2026-09-20 20:58:21 +02:00
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="M10.75 7H12.25V5.5H10.75V7Z" fill="black"/>
<path d="M7.5 7H9V5.5H7.5V7Z" fill="black"/>
<path d="M4.25 7H5.75V5.5H4.25V7Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 0C0.895786 0 0 0.895786 0 2V10.5C0 11.6042 0.895786 12.5 2 12.5H3V15.25C3 15.5405 3.16778 15.805 3.43066 15.9287C3.6937 16.0523 4.00473 16.0126 4.22852 15.8271L8.27051 12.4775L13.9941 12.4961C15.1007 12.4991 15.9999 11.6033 16 10.4961V2C16 0.895786 15.1042 0 14 0H2ZM14 1.5C14.2758 1.5 14.5 1.72421 14.5 2V10.4961C14.4999 10.7727 14.2753 10.9969 13.998 10.9961L8.00195 10.9775L7.87207 10.9893C7.74389 11.0115 7.62281 11.0664 7.52148 11.1504L4.5 13.6543V11.75C4.5 11.3358 4.16421 11 3.75 11H2C1.72421 11 1.5 10.7758 1.5 10.5V2C1.5 1.72421 1.72421 1.5 2 1.5H14Z" fill="black"/>
</g>
</svg>