C
int32_t __stdcall pdfGetPDFVersion(PPDF IPDF);
BOOL32 __stdcall pdfSetPDFVersion(PPDF IPDF, TPDFVersion Version);
BOOL32 __stdcall pdfGetPDFVersionEx(PPDF IPDF, TPDFVersionInfo* Value);
Delphi
function pdfGetPDFVersion(const IPDF: PPDF): Integer; stdcall;
function pdfSetPDFVersion(const IPDF: PPDF; Version: TPDFVersion): LongBool; stdcall;
function pdfGetPDFVersionEx(const IPDF: PPDF; var Value: TPDFVersionInfo): LongBool; stdcall;
Purpose. Get/set the output document's declared PDF version (the /Version catalog entry / header version this SDK will write on close).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Version | *(Set only)* The TPDFVersion ordinal to write. |
Value | *(Ex only)* Output: Major/Minor version numbers. |
Return value. pdfGetPDFVersion: the version ordinal; 0 if IPDF invalid. pdfSetPDFVersion/pdfGetPDFVersionEx: True on success.
See also. pdfGetInPDFVersion (the import-source counterpart, with a real version-encoding quirk).
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category
Setters
Exported names
pdfSetPDFVersion
String variants
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
See working code
Worked examples — complete programs in ten languages.