| Exported names | pdfCloseFile |
|---|
Purpose — Serialize and finish the document.
Description — Runs the full serialization pipeline (font subsetting and embedding → images/templates/annotations/fields/outlines → optional encryption → xref + trailer) and closes the output. Only a TRUE return guarantees a complete file on disk (or a complete memory buffer). The instance returns to idle and can open a new document.
BOOL32 __stdcall pdfCloseFile(PPDF IPDF);
function pdfCloseFile(const IPDF: PPDF): LongBool; stdcall; external 'LumasPdf.dll';
Return value — TRUE on success; on FALSE, drain the error log — the output must be considered unusable.
See also — pdfCloseFileEx, pdfGetBuffer
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfCloseFile
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.