BeginDoc

Printing, VCL, document creation

Description

Starts a new job: creates a fresh PDF document in the owned library instance, applies Title when it is not empty, and opens the first page for drawing through Canvas

The first canvas is created at the active page size in pixels, derived from the paper dimensions, Orientation and DPI. Printing becomes True and PageNumber becomes 1

Syntax

Delphi

Procedure TPDFlibPrinter.BeginDoc;

Remarks

Calling BeginDoc while a job is active raises EPDFlibPrinter

Documents left in the library instance by an earlier job are removed, so a completed document stays available only until the next BeginDoc

If the first canvas cannot be created the job is terminated, Aborted becomes True and EPDFlibPrinter is raised

FileName, Title, DPI, CanvasOptions, Orientation and the paper dimensions cannot be changed until the job ends

See also

TPDFlibPrinter, GetCanvasDC, LoadFromCanvasDC, SetInformation