This chapter covers keeping a document private: protecting it with a password or for chosen people's certificates, removing hidden information, and redacting, which permanently removes text and pictures (account numbers, Social Security numbers, names) so they can't be recovered.
Choose Tools ▸ Protect (or click Protect on the tool strip). Its bar has:
The same commands are on the menus: File ▸ Protect Using Password, and Edit ▸ Protection ▸ Encrypt with Password…, Encrypt with Certificate…, and Remove Security.
Note: Protection is applied when you save. Until then it is an ordinary step you can undo, and the status bar reminds you that it will be applied when you save.
You can set an open password, a permissions password, or both. The file is encrypted with AES-256. Keep the passwords safe: they can't be recovered.
| Permission | When it is unticked |
|---|---|
| Printing | The document may not be printed. |
| Copying text and images | Text and pictures may not be copied out of it. |
| Changing the document | Pages and content may not be changed. |
| Adding comments | Comments and markup may not be added. |
| Filling in forms | Form fields may not be filled in. |
If you untick anything, you must set a permissions password, so the restrictions can't simply be switched off. Whoever knows the permissions password can change them. Permissions are honored by PDF programs that respect them; they are a request, not a lock, so use an open password (or certificate security) for anything truly confidential.
When you open a document that needs a password, PlanetPDF asks for it. Saving the document afterwards keeps its protection.
Open the document (with its password), then choose Edit ▸ Protection ▸ Remove Security, or in the Protect tool Advanced Options ▸ Remove Security or Advanced Options ▸ Document Security ▸ No Security. Save the document: the protection is removed when you save.
The Protect tool's Advanced Options menu holds:
Instead of a password that has to be passed around, you can encrypt a document so that only certain people can open it, each with their own Digital ID. Nobody shares a password.
Important: Keep yourself on the list, or you won't be able to open the file either.
The file is encrypted with AES-256. PlanetPDF keeps the people's public certificates inside the (encrypted) file, so when you change and save it later, it is encrypted for the same people again. For a certificate-encrypted file made by another program, PlanetPDF only knows you, the person who opened it, and warns you about that.
When you open a document encrypted for certain people, PlanetPDF first tries the Digital IDs in your Windows certificate store (or Mac Keychain). If none of them fits, the Certificate-Encrypted File window asks for your Digital ID file (.pfx / .p12) and its Password; click Open.
Advanced Options ▸ Security Properties… shows how the open document is protected: the security method, whether a password is needed to open it (or who can open it, for certificate security), the encryption, and whether each permission is allowed. If you have set protection that isn't saved yet, it says so. Change Settings… opens the matching password or certificate window.
A security envelope packs any files (PDFs, spreadsheets, anything) into one protected PDF, so you can send them safely. The PDF has a cover page listing the files, which travel inside it as attachments.
The person you send it to opens it in PlanetPDF (or another PDF program) and saves the attachments from the Attachments panel.
A security policy saves protection settings to use again, so the same rules go on every document of a kind. Choose Advanced Options ▸ Manage Security Policies…:
Passwords are never stored in a policy. A password policy keeps which things are allowed; when you apply it, you type the passwords. A certificate policy keeps the people's public certificates. Policies are saved in your profile folder.
When you make a new PDF from a protected document (a redacted copy, a sanitized copy, extracted or split pages, a smaller copy, an image-only PDF, or a PDF combined from files of which any is protected), PlanetPDF asks, for example, "Protect the redacted copy too?":
A protected new file is encrypted as it is written, so its folder never holds an unprotected copy, not even for a moment (a redacted copy is checked first in a folder only you can open). On the command line, redact, compress, extract, split, and export --format image_pdf keep a protected file's password on the new files; add --no-protect to leave it off on purpose. Each password keeps its role:
protect on the new file.--password, or add --no-protect.Covering text with a black box isn't enough: the text is still in the file and can be copied out. Redacting in PlanetPDF permanently removes everything under the marks you make: text, parts of pictures, drawings, and any comments, links, and form fields they overlap. It works in two stages: first you mark what should go, then you apply the marks, which writes a new, redacted file and checks it.
Open the Redact tool with Tools ▸ Redact, the Redact button on the tool strip, or Edit ▸ Redact Text & Images. The Redaction panel opens beside the page.
Marks show as red outlines. They aren't applied yet: you can still remove or undo them.
Choose Redact Text & Images ▾ ▸ Find Text & Redact… (the arrow beside the button); the cursor goes to the panel's Find and mark box.
On a document of 20 pages or more, a window counts the pages as they're searched ("Pattern 2 of 3: searching page 14 of 80"), with Cancel.
Exact text finds a phrase even when it wraps onto the next line. A regular expression is a search pattern for things that vary, for example Invoice \d+ finds "Invoice" followed by any number.
Choose Redact Text & Images ▾ ▸ Redact Pages…, type the pages (for example 1, 3-5), and click OK. Each page gets one mark covering all of it.
The panel's Review marks list shows every mark: its page, its type (Area, SSN, the search, Page…) and the text it will remove. Click a mark to see it on the page. Remove takes away the selected marks (or press Delete), Remove All takes away all of them. Marks are saved with the document as standard redaction marks, so you can save, close, and finish later, and other PDF programs see them too.
Redact Text & Images ▾ ▸ Properties… shows the panel's Options:
_redacted added.A copy that fails its checks is not saved. If any check fails, nothing is written and nothing is replaced: the report says "The redacted file was not saved" and offers Discard. Fix what it lists and apply again. When the copy was going to a new file, Save Anyway… saves it after a second question (for example, to look at it); a failed copy is never saved over the original.
Your open document doesn't change: it keeps its marks, so you can fix something and apply again. The report's Open Redacted File button opens the result.
Overwriting the original: if you choose the original file's own name, PlanetPDF asks a second time ("Overwrite the Original?"), because the unredacted original is then gone for good and the undo history is cleared. If the checks pass with warnings (for example, a word you marked still appears somewhere you didn't mark), the report comes first and the original isn't replaced unless you click Replace the Original; its default, Don't Replace, keeps it. Saving a separate copy is safer.
After applying, PlanetPDF reads the new file back in several independent ways (two different PDF readers, the raw file data, the text under each box, the picture areas under each box) to make sure nothing you marked can still be found. The headline sums it up, and each check is listed with its result:
| Result | What it means |
|---|---|
| PASS | That check found nothing left: for example "removed" for each piece of marked text, "no text under N redaction(s)" for each page, image areas blank, a single revision of the file. |
| WARNING | Not a leak, but worth a look. The most common: the same words "still appear where they weren't marked", elsewhere in the document. Mark those too if they should go, and apply again. Straight level or upright lines and frames that cross a box, such as table lines, are a warning too: they keep their whole outline in the file. |
| FAIL | Something marked can still be read or extracted from the file, for example "text remains under the box", with the page, the box, and the text found; a curved or slanted shape reaching under a box (text drawn as outlines, a signature drawn as lines, a zig-zag); the marked words left somewhere else in the file, such as its information, an attachment, a comment, or a field, even when they also appear unmarked on a page; a page thumbnail; or a check that couldn't run (a picture under a box that couldn't be read, or the second PDF reader couldn't read the file). The headline says "Do not share this file", and the file isn't saved. |
Copy Report copies the whole report as text, for your records. Very short marked text (under four characters) is checked on the pages by area only, since searching for it would find it everywhere; elsewhere in the file (its information, bookmarks, attachments, comments, and fields) it is looked for as a whole word, and found there it fails. Page thumbnails, small pictures of the pages as they were, are always removed from redacted pages.
A PDF often carries more than you see: the author's name, earlier titles, attached files, scripts. Sanitize Document removes that from the open document. Choose Remove Hidden Information on the Protect bar or Sanitize Document on the Redact bar, untick anything to keep, and click Sanitize. The status bar says what was found and removed. It is one step you can undo; save the document to keep the change. (When you apply redactions, the same choices are applied to the redacted copy instead.)
| Option | What it removes |
|---|---|
| Document information | Title, author, subject, keywords, creator, and dates. |
| XMP metadata | The XML metadata packet (often a copy of the above, plus history). |
| Bookmarks | The outline shown in the Bookmarks panel. |
| Attachments | Embedded files and file-attachment comments. |
| JavaScript | Document, page, and form-field scripts, including field formatting. |
| Hidden layers | Content in layers that are turned off, or hidden by a layer rule (a rule such as "show only when layer A is on and layer B is off"). It can't be searched, so it's easy to miss. Pictures that only a hidden layer drew leave the file too. |
| Comments and markup | Notes, highlights, drawings, and stamps that haven't been flattened. |
| Form field values | Every field's value and default value, including XFA form data. |
| Tags and alternate text | The accessibility tags, with the alternate text of pictures and replacement text, wherever it is written: in the tags, in the pages themselves, in the pages' resources, and in comments' and pictures' own content. It can describe what was redacted. Screen readers then read the pages without tags. |
A signed PDF is saved by adding the changes to the end of the file, which keeps the signatures valid but also keeps everything before the changes. Removed items would still be in the file's earlier, signed version, where anyone can dig them out. So on a signed document the Sanitize window says that the signatures are removed too, and offers two buttons:
On the command line, planetpdf sanitize refuses a signed file unless you add --remove-signatures.
PlanetPDF never shows what a hidden layer holds. It follows the layers' own rules, as Adobe Reader does, to know what is hidden. If it can't tell which content belongs to a hidden layer, can't read a layer's rule, or removing the layers would make hidden words appear, it stops, changes nothing, and says so. Untick Hidden layers to remove everything else.