Rebuild a PDF locally
Copy every page of the document into a brand-new PDF, in your browser, using MuPDF compiled to WebAssembly. It is the step that makes an edit-restricted file workable, and it is honest about what it leaves behind. Free to use, with no account.
What rebuilding actually does
A new, empty PDF document is created in memory. Then each page of your file is grafted into it, one by one, with MuPDF running as WebAssembly inside the browser tab. The result is saved as a normal PDF with no encrypted content stream. This is not a re-save, and it is worth being precise about that:
- Your PDF opened in the browser by the WASM engine
- A new, empty document created in memory
- Page by page graft the page content moves across
- A new PDF written by the browser, then downloaded
What does not survive the rebuild
Measured on test files, and worth reading before you rebuild anything you care about:
- Annotations are dropped: review comments, stamps, sticky notes and form fields live outside the page content, and they are not carried across.
- Document metadata is dropped: title, author, producer and the rest are not copied.
- Document-level extras go too: bookmarks, attached files, and any scripts defined for the whole document.
- Page content is copied: the visible text, images and drawings are what the graft does carry over.
So: keep your original until you have checked the rebuilt file. For a scanned document or a straightforward report, that trade is fine. For a contract with tracked comments, rebuild a copy and compare.
When it is worth doing
- The file opens but you cannot edit it. Permissions encryption is the common case: the document displays fine, but editing and copying are restricted. Rebuilding produces a normal file, which you can then clean up with the watermark tool.
- Another tool produced garbage. A file assembled by an unusual generator sometimes trips up readers and editors alike. Rebuilding the pages into a fresh document is a reasonable repair step.
- You want the annotations gone. Since they are not copied, rebuilding is an effective way to strip comments and form fields from a file you are about to share; check the result before relying on it.
What it refuses to do
If the file needs a password just to open, the tool stops and tells you so. It does not try passwords, does not "recover" them, and does not work around the requirement. A document you are locked out of is not a technical problem to be solved here: being able to open it is the difference between authorization and circumvention, and this project stays on the first side of that line.
About the engine
The rebuild uses MuPDF compiled to WebAssembly. The engine is about 10 MB uncompressed, served compressed (roughly 4.4 MB over the network); your browser downloads it the first time you press the button and caches it afterwards. It is only fetched when a rebuild is actually requested, or when you ask for a page preview in whiteout. Opening this site does not download it.
Use it on documents you are entitled to change. Your own files, documents you have a licence to edit, material you have been given permission to modify. Removing someone else's copyright notice, or making a document look like it came from somewhere it did not, is not what this was built for.
Questions
Is rebuilding the same as removing a watermark?
No. Rebuilding copies page content into a new document; it does not look for watermark objects. On an edit-restricted file it is the step that makes a watermark removable, which is why the rebuild button appears in the watermark tool too.
Why does it need a 10 MB engine when the rest of the site does not?
Because reconstructing a PDF with encrypted content streams is a job the small library cannot do. Rather than ship the engine to everybody on every page load, it is fetched only when a rebuild or a page preview is requested.
Does rebuilding make the file smaller?
No, and it is worth knowing before you rely on it. On a 20.08 MB, 60-page test file the rebuilt copy came out at 20.76 MB, about 3% larger: metadata, bookmarks and attachments are dropped, but the page content is re-serialised. The page count is preserved (60 pages in, 60 pages out). Use the rebuild to clear an encryption state, not to shrink a file.
Will the rebuilt file look identical?
Pages should look the same, but annotations and metadata are gone, and object structure is reorganised. Compare the two files before you delete anything.
Can it rebuild a PDF that is damaged?
Sometimes rebuilding the readable pages is a standard repair approach, and it may succeed where a simple re-save fails. If the page tree itself is broken, it will stop and say so.
Related
- Remove watermark from PDF: scan, review, delete.
- PDF whiteout: cover content on selected pages.
- Rebuild a PDF locally: copy pages into a fresh document.
- Security architecture and FAQ.