Документация PDFiumVCL

ModifiedDate property

Эта запись API сохраняет идентификаторы, сигнатуры, блоки кода и термины PDF в исходном виде.
Component: TPdf  ·  Unit: PDFium
Last-modification timestamp recorded in the document Info dictionary.

Syntax

property ModifiedDate: WString; // read only

Description

ModifiedDate returns the /ModDate entry from the document Information dictionary (PDF 1.7 spec section 14.3.3) as the raw PDF date literal. PDF stores the timestamp as a literal date string formatted as D:YYYYMMDDHHmmSSOHH'mm' — for example D:20260514103015+08'00' means 14 May 2026 10:30:15 in UTC+08:00. The D: prefix and trailing apostrophe are part of the literal syntax (PDF 1.7 spec section 7.9.4).

The string is empty when Active is False, when the document Info dictionary is missing, or when no /ModDate was written. Producers update this entry on each save / incremental update; comparing ModifiedDate with CreationDate is a quick way to detect whether the file has been edited since the original render.

The returned value is the raw literal, not a parsed TDateTime. Strip the D: prefix, optional timezone, and trailing apostrophe before calling EncodeDateTime; alternatively use a regular expression that captures (\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})([+-Z])(\d{2})'(\d{2})'.

Remarks

Example

var Raw: WString;
Raw := Pdf1.ModifiedDate;
if Raw <> '' then
begin
  // e.g. "D:20260514103015+08'00'"
  Memo1.Lines.Add('Last modified: ' + Raw);
end;

See Also

CreationDate, Producer, MetaText, Author