API referenceCore SDK

pdfGetInDocInfo

Read a document-info field from the currently open import

CategoryDocument metadata (import)

Purpose — Read a document-info field from the currently open import source (not the output document).

Description — Reads directly from the import file's parsed /Info dictionary — this is a live read of someone else's PDF, so unlike the output side, diCompany/diPDFX_Ver(7)/diCustom(8)/diPDFX_Conf(9) that lack a standard key name (Company and Custom have none in the reference /Info schema either) simply return nothing; there is no equivalent "silently dropped at write time" issue here since this path never writes.

Declarations

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

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle with an open import source.
DInfoTDocumentInfoField to read. diCompany/diCustom always return empty (no standard /Info key).
ValuePWideChar*Receives the value.

Return value — String length, or 0 if unset, no import source is open, or DInfo has no standard key.

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

See alsopdfGetInDocInfoEx

C# (P/Invoke)

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

Getters

Exported names

pdfGetInDocInfo

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.