GetPDFVersion

Document properties

Description

Returns the PDF version of the loaded document as a string such as '1.4', '1.7' or '2.0'. This is the effective version: if the document content needs a newer PDF version than the file header declares, the detected requirement is reported, so a freshly loaded document shows the version its content really needs

Syntax

Delphi

Function TPDFlib.GetPDFVersion: WideString;

Return values

Version stringThe effective PDF version of the loaded document, for example '1.7'
''An empty string, returned when no document is loaded

Remarks

The reported value matches GetInformation(0). Use GetInformation(100) to read the literal %PDF-X.Y header value as it was before any content-driven version bump. The function takes no parameters

See also

GetInformation, LibraryVersion, GetPackObjectStreams