API referenceCore SDK

pdfGetDocInfo

Read the current in-memory value of one document-info field.

CategoryDocument metadata

Purpose — Read the current in-memory value of one document-info field.

Declarations

C
int32_t __stdcall pdfGetDocInfo(PPDF IPDF, int32_t DInfo, const wchar_t* Value);
Delphi
function pdfGetDocInfo(const IPDF: PPDF; DInfo: Integer; var Value: PWideChar): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
DInfoIntegerOrd(TDocumentInfo).
ValuePWideChar*Receives the value, or NULL if unset.

Return value — String length in characters, or 0 if the handle is invalid or the field is unset. Reads whatever is in memory regardless of whether it will actually serialize — see the chapter note above for diCompany/diCustom.

Memory & buffersValue points at an engine-owned buffer valid until the next call to this function.

See alsopdfSetDocInfo, pdfGetDocInfoEx

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetDocInfo(IntPtr IPDF, int DInfo, ref IntPtr Value);
Area
Core SDK
Category

Getters

Exported names

pdfGetDocInfo

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.