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 fresh document contains no pages until you call AddPage / ImportPages

Wraps the matching PDFium API and surfaces it as a TPdf instance member, so you never have to juggle raw FPDF_DOCUMENT handles yourself

Remarks

Example

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

See Also

CreateAttachment, LoadDocument, Active