API referenceCore SDK

pdfSetDocInfoEx

Set a document-info field, including (per the reference ABI's

CategoryDocument metadata
Exported namespdfSetDocInfoExA, pdfSetDocInfoExW
AvailabilityPartial — Key accepted but discarded, diCustom is single-slot and never serializes (see the chapter note)

Purpose — Set a document-info field, including (per the reference ABI's intent) a named custom field via diCustom + Key.

Description — compatibility shim. Key is accepted in the exported signature but is never read by this build's implementation — it calls the exact same TLumasPdfDoc.SetDocInfo(DInfo, Value) as pdfSetDocInfo, ignoring Key entirely. Combined with diCustom's missing key mapping (chapter note above), a diCustom value set through this call is readable in-memory but never reaches the output file at all, and only the most recent call for diCustom survives regardless of Key.

Declarations

C
BOOL32 __stdcall pdfSetDocInfoExA(PPDF IPDF, TDocumentInfo DInfo, const char* Key, const char* Value);
BOOL32 __stdcall pdfSetDocInfoExW(PPDF IPDF, TDocumentInfo DInfo, const char* Key, const wchar_t* Value);
Delphi
function pdfSetDocInfoExA(const IPDF: PPDF; DInfo: TDocumentInfo; const Key, Value: PAnsiChar): LongBool; stdcall; external 'LumasPdf.dll';
function pdfSetDocInfoExW(const IPDF: PPDF; DInfo: TDocumentInfo; const Key: PAnsiChar; const Value: PWideChar): LongBool; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle with an open document.
DInfoTDocumentInfoField to set.
KeyPAnsiCharAccepted but discarded — see Description.
ValuestringNew value. NULL is rejected.

Return valueTRUE on success; FALSE if no document is open, Value is NULL, or the handle is invalid.

Remarks — For the ten standard fields (everything except diCompany/ diCustom), prefer the plain pdfSetDocInfo — the Ex suffix buys nothing extra in this engine.

See alsopdfSetDocInfo

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Setters

Exported names

pdfSetDocInfoExA pdfSetDocInfoExW

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.