PageSourceSearch

https://securoxen.io/assets/a-pdf-is-an-envelope-not-a-page-BmEQgYgz.js

js securoxen.io collected 2026-10-02 01:59:56 UTC 6,951 bytes, 1 lines download raw bytes

1import{j as e,co as c,bW as x}from"./index-0qbe4j-K.js";import{P as m}from"./prose-CP3GO64z.js";import{b as h,L as n}from"./react-vendor-CuqwDvgQ.js";import{R as p}from"./index-DUfLO5S1.js";import{W as u}from"./widget-frame-BWiYKP5E.js";const a=[{revision:1,field:"API key",value:"sk_test_4eC39Hq1x8rTa9KdLtW"},{revision:2,field:"API key",value:"sk_test_9fB41Yr2z9sUc5MpQx"},{revision:3,field:"API key",value:"sk_live_7dA83Nz3t0vRd6KjSw"}];function g(t,r){return t[Math.min(r,t.length-1)]}function f(t,r){return t.slice(0,r)}function v(t){return[...t].reverse()}function b(){const[t,r]=h.useState(1),[d,i]=h.useState(!1),o=t>=a.length,l=g(a,t);return e.jsxs(u,{title:"Try it: three saves, one file",hint:"each save appends a revision",children:[e.jsxs("div",{className:"border-border bg-background mb-3 rounded-lg border p-4 shadow-sm",children:[e.jsxs("div",{className:"text-muted-foreground mb-3 flex items-center justify-between text-[10px]",children:[e.jsx("span",{children:"internal-report.pdf"}),e.jsxs("span",{children:["revision ",t," of ",a.length]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"bg-muted h-2 w-2/3 rounded"}),e.jsx("div",{className:"bg-muted h-2 w-full rounded"}),e.jsx("div",{className:"bg-muted h-2 w-3/4 rounded"}),e.jsxs("p",{className:"pt-2 font-mono text-xs",children:[l.field,": ",e.jsx("span",{className:"text-emerald-600 dark:text-emerald-400",children:l.value})]})]})]}),e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[!o&&e.jsxs("button",{type:"button",onClick:()=>{r(s=>s+1),i(!1)},className:"border-border hover:bg-muted inline-flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs",children:[e.jsx(c,{className:"size-3.5"}),"Save an edit (append revision)"]}),o&&e.jsxs("button",{type:"button",onClick:()=>i(s=>!s),className:"border-border hover:bg-muted inline-flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs",children:[e.jsx(x,{className:"size-3.5"}),d?"Hide earlier revisions":"Recover earlier revisions"]}),e.jsxs("button",{type:"button",onClick:()=>{r(1),i(!1)},className:"border-border hover:bg-muted inline-flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs",children:[e.jsx(p,{className:"size-3.5"}),"Reset"]})]}),o&&d&&e.jsx("div",{className:"border-border rounded-lg border",children:v(f(a,t)).map(s=>e.jsxs("div",{className:"border-border flex items-center gap-3 border-b px-3 py-2 font-mono text-xs last:border-0",children:[e.jsxs("span",{className:"text-muted-foreground",children:["r",s.revision]}),e.jsxs("span",{className:"truncate",children:[s.field,":"," ",e.jsx("span",{className:s.revision===a.length?"text-emerald-600 dark:text-emerald-400":"text-red-500",children:s.value})]})]},s.revision))}),e.jsx("p",{className:"text-muted-foreground mt-3 text-xs",children:"Incremental saves append rather than rewrite, so earlier values stay in the file. A tool that rewrites the PDF from scratch does not have this problem - which is what permanent redaction has to do."})]})}function P(){return e.jsxs(m,{children:[e.jsx("p",{children:`A PDF looks like a flat page, and the mental model that comes with it - "it's a picture of a document, what you see is what there is" - is wrong in ways that leak data. A PDF is a container. Around the pixels you see, it carries a text layer, fonts, metadata, hyperlinks and sometimes embedded objects, each of which a recipient can read independently of what is rendered on screen.`}),e.jsx("p",{children:'Understanding the container is what separates "redacting a PDF" from "drawing a black box over a PDF".'}),e.jsx("h3",{children:"What you see is not what is in the file"}),e.jsxs("p",{children:["PDF pages are drawn, not photographed. Text is stored as characters plus positions, so a reader can select, copy and search it - even text that looks covered. This is why the"," ",e.jsx(n,{to:"/tools/pdf-redaction",children:"PDF Redaction"})," tool warns that removing content means destroying the underlying text, and why the annotation approach from"," ",e.jsx(n,{to:"/learn/share-a-screenshot-without-leaking",children:"how to share a screenshot without leaking"})," ","works there but not here."]}),e.jsxs("p",{children:["The same logic cuts the other way. When you extract pages with the"," ",e.jsx(n,{to:"/tools/pdf-toolkit",children:"PDF Toolkit"}),", everything attached to those pages comes along: the text layer, the fonts, the metadata. Splitting a document does not clean it."]}),e.jsx("h3",{children:'"Saved" does not mean "rewritten"'}),e.jsx("p",{children:'Many PDF editors save by appending a revision that says "from here on, use these new bytes" rather than rewriting the file. The page you see is the newest revision; the earlier ones stay in the file, and a viewer that walks every revision can recover content you thought you had replaced. Try it:'}),e.jsx(b,{}),e.jsx("p",{children:"The practical consequence: if a document ever held a credential or a wrong value, merely re-saving it on top may not be enough. A tool that rewrites the PDF from scratch - which is what permanent redaction has to do - closes the gap. The rest of the file is still worth scrubbing."}),e.jsx("h3",{children:"The envelope around the page"}),e.jsx("p",{children:"The parts of a PDF that are easy to forget, and what each one can carry:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Text layer"})," - selectable characters, including text that is invisible, white, or covered by an annotation."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Metadata (XMP)"})," - author names, software, timestamps and document history. Strip it with the"," ",e.jsx(n,{to:"/tools/metadata-stripper",children:"Metadata Stripper"})," before the file goes anywhere."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Embedded fonts"})," - subsets of the fonts used, which can carry details about the machine that created the document."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Hyperlinks and destinations"})," - visible and invisible, and every one is a potential phishing vector if the document is untrusted."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Embedded objects and scripts"})," - attachments, forms and JavaScript, the parts that make an untrusted PDF closer to an executable than a document."]})]}),e.jsx("h3",{children:"A short checklist"}),e.jsxs("ol",{children:[e.jsx("li",{children:"Treat a PDF from an unknown sender like an attachment that can execute things."}),e.jsx("li",{children:'Never "redact" by covering text - use a tool that destroys the text layer.'}),e.jsx("li",{children:"Strip metadata before sharing; it travels with every extraction."}),e.jsx("li",{children:"If a document ever held a secret, assume re-saving left it recoverable until a rewriting tool has run."}),e.jsx("li",{children:"When splitting or merging, remember the text layer comes along for the ride."})]})]})}export{P as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.