PDFium Delphi Component Docs

CreateDocument method

Component: TPdf  ·  Unit: PDFium
Starts a brand-new empty in-memory PDF document when the component is inactive

Syntax

procedure CreateDocument;

Description

Creates a brand-new empty in-memory PDF document; requires Active to be False (calling CreateDocument while a document is already open raises EPdfError)

The new document has zero pages until AddPage / ImportPages is called

Wraps the corresponding PDFium API and exposes it as a TPdf instance member so consumers do not have to manage FPDF_DOCUMENT handles directly

Remarks

Example

Pdf1.CreateDocument;
Pdf1.AddPage(1, 595, 842);

See Also

CreateAttachment, LoadDocument, Active