BeginFormXObject

Page layout

Description

Starts a temporary Form XObject drawing surface with the requested width and height. While the build is active, normal drawing calls write to the temporary page selected by this function

Finish the build with EndFormXObject to receive a captured-page handle, or call CancelFormXObject to discard the temporary drawing surface

Syntax

Delphi

Function TPDFlib.BeginFormXObject(Width, Height: Double): Integer;

ActiveX

Function PDFlib::BeginFormXObject(Width As Double, Height As Double) As Long

DLL

int DLBeginFormXObject(int InstanceID, double Width, double Height);

Parameters

WidthThe width of the Form XObject drawing surface in PDF units
HeightThe height of the Form XObject drawing surface in PDF units

Return values

0The dimensions were not valid, a build was already active, or the temporary drawing surface could not be created
1The Form XObject drawing surface was created and selected

Remarks

EndFormXObject returns a handle that can be reused with DrawCapturedPage, DrawCapturedPageMatrix, DrawRotatedCapturedPage, NewTilingPatternFromCapturedPage, SetCapturedPageOptional, and SetCapturedPageTransparencyGroup

Do not select another page or document until the build is ended or canceled; drawing commands should target the temporary page selected by BeginFormXObject

See also

EndFormXObject, CancelFormXObject, DrawCapturedPage, NewTilingPatternFromCapturedPage