How to check that an unlocked PDF matches the original
By UnsealPDF ·
Removing a password from a PDF rewrites the file. Usually nothing important changes, but some methods do more than remove the lock. "Print to PDF", for example, re-prints the document, which can drop bookmarks, form fields, links and the hidden text layer that makes the document searchable. If the copy matters, it is worth checking.
Quick checks anyone can do
- Page count. Open both files and compare the number of pages.
- First, last and any complex pages. Look at tables, images, signatures and small print side by side.
- Search and copy. Search for a word you know is in the document. If search finds nothing, the text layer may have been lost.
- Links, bookmarks and form fields. If the original had them, check that they still work.
- Document properties. Compare the title, author and other details in your viewer's properties panel.
A deeper check with a free tool
The free, open-source tool qpdf can test a file's structure. Its --check option reads the whole file and reports errors or warnings (qpdf command-line documentation). A clean result means the unlocked file is well formed. It does not, on its own, prove the content matches the original.
Why the file's hash will not match
A hash or checksum (such as SHA-256) changes if a single byte changes. Removing encryption changes many bytes, so the unlocked copy will never have the same hash as the locked original. That is expected and is not a sign of damage. A meaningful comparison looks at the content: the pages, text, images and document details.
What no check can promise
- Digital signatures will not validate after any rewrite. If you need a signature to remain valid, keep and use the original.
- Acceptance by others. A matching copy does not mean a court, agency or employer will accept it. Ask them what they need.
How UnsealPDF checks before you pay
Every unlocked copy goes through a structural check with qpdf, a check that no password or encryption remains, a page-count match, and an object-by-object comparison with your decrypted original, including document metadata. You see the results and a preview before paying, and if a check fails we do not offer the file and you are not charged. The details are on how we verify the unlocked copy.
Sources
- qpdf documentation, Running qpdf (
--check): https://qpdf.readthedocs.io/en/stable/cli.html