Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Check a PDF’s Creation & Modification Dates

Originally published at htpbe.tech . The version on htpbe.tech stays in sync with the latest detection algorithm — refer to it for the canonical text. Every PDF carries two dates: when it was created, and when it was last saved. Open any file’s properties and you’ll find both in seconds. Both are plain text, the same kind of string as the title or the author name. Any editor that can open a PDF…

Every PDF file carries two dates: one for its creation and another for the last time the file was saved. Open any PDF’s properties, and you'll find both dates displayed. These dates are in plain text format, just like the title or author name. However, anyone with a PDF editor can modify these dates to match their preference, making them a claim rather than a fact.

To correctly check a PDF’s dates, it’s essential to understand the difference between reading and trusting them. The Info dictionary, located in the file’s trailer, holds the CreationDate and ModDate fields. Some PDFs also include these values in an embedded XMP packet. Both of these fields reside inside the file itself and travel with it when shared or moved.

CreationDate signifies when the document was first generated, while ModDate records the last time the file was saved. Any operation that modifies the file, like editing text, adding a digital signature, or running it through a compressor, updates this date. In files that have never been altered, both dates should match or be close enough that the discrepancy is insignificant.

However, it’s crucial to remember that both dates are just claims and not necessarily facts. Editing software can freely alter these fields without raising any alarms. Therefore, a mismatch or suspiciously round number in the dates doesn't always indicate fraud. Conversely, matching dates don't guarantee an untouched file either.

Someone can forge a document and set both dates to whatever they want, including making them identical to hide any edits.

Although CreationDate and ModDate are stored as plain-text strings in a specific format, this format lacks cryptographic protection. They can be rewritten using a text editor, command-line metadata tools, or any PDF editor's "document properties" panel, and the file will open normally afterward without warning of any changes. This lack of tamper-evidence makes the two dates vulnerable to manipulation.

While reading the dates alone provides one honest fact—mismatched dates indicate something was written to the file after its creation—reading them doesn’t tell you whether the file has been tampered with. The honest fact is that a difference in the dates signifies something was written to the file after its creation, but the dishonest fact is that the exact values are self-reported by whatever software last touched the file, and nothing stops that software or a person with a text editor from writing false ones.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Africhange vs LemFi vs NALA: which UK remittance app should you switch to?

If you regularly send money from the UK to Nigeria, you don’t necessarily have to stick with one remittance app.You can have Africhange, LemFi, and NALA on the same phone, enter £500 into each, and…

  • Africhange had higher GBP-to-NGN exchange rate 91.8% of the time compared to LemFi
  • NALA charges £0.99 fee for bank transfers to Nigeria, LemFi does not charge separate transfer fee
  • LemFi claims largest customer base of over 2 million users, NALA trusted by over 1 million globally

More from Wednesday 16 September →