A3DPDFDocumentGetVersion
-
A3DStatus
A3DPDFDocumentGetVersion(const A3DPDFDocument *pDoc, A3DUTF8Char **ppcVersion) Retrieves the PDF version of a given document.
The version returned by``A3DPDFDocumentGetVersion``is a string matching the value displayed within Adobe PDF Reader properties.
The result string is composed of the PDF version followed to by the minimum Acrobat version that supports the format between parenthesis.
PDF Version Specification
The PDF version format follows the``MAJOR.MINOR``rule with the following Acrobat/PDF compatibility matching:
**PDF version** | **Acrobat version**
- 1.7and older | Same version specifier
- 1.8 | Acrobat*9*
- 1.9 | Acrobat*10*
Starting from Acrobat*9*, the Adobe Version may contain an extension level specifier based upon Adobe extensions registry. The specifier follows the version, separated by a comma.
for example:
- A document created empty with HOOPS Publish would return:”1.6 (Acrobat 7.x)”.
- A document created from a file saved in Acrobat with option ‘Acrobat 10 and later’ would return:”1.7, Adobe Extension Level 8 (Acrobat X)”.
Memory Management
In case of success,``ppcVersion``contains heap allocated memory you are responsible for. To free the memory on``ppcVersion``, call``A3DPDFDocumentGetVersion``with``pDoc``set to*0*.
Parameters
pDoc: The Document object get the version from.
ppcVersion: A pointer.
Returns
A3D_SUCCESSor an error code in case of failure.