API referenceCore SDK

pdfCreateNewPDF

Open an output file for an already-created document

C
BOOL32 __stdcall pdfCreateNewPDFA(PPDF IPDF, const char* OutPDF);
BOOL32 __stdcall pdfCreateNewPDFW(PPDF IPDF, const wchar_t* OutPDF);
Delphi
function pdfCreateNewPDFA(const IPDF: PPDF; const OutPDF: PAnsiChar): LongBool; stdcall;
function pdfCreateNewPDFW(const IPDF: PPDF; const OutPDF: PWideChar): LongBool; stdcall;

Purpose. Open an output file for an already-created document handle (from pdfNewPDF) — the second half of the classic two-step LumasPDF document-creation sequence.

Description. A thin wrapper over OpenOutputFile, the same implementation backing pdfOpenOutputFile (Document Lifecycle) — this entry point exists purely as an alternate, convention-familiar name/calling convention; there is no behavioral difference from pdfOpenOutputFile beyond the name.

Parameters.

ParameterDescription
IPDFAn existing document handle from pdfNewPDF.
OutPDFOutput file path.

Return value. True if the output file opened successfully; False otherwise.

See also. pdfOpenOutputFile.

C# (P/Invoke)

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

Object Creation

Exported names

pdfCreateNewPDFA pdfCreateNewPDFW

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.