SetPageBox

Page properties

Description

Sets the dimensions of the selected page's boundary rectangles. The MediaBox represents the physical medium of the page.

The CropBox represents the visible region of the page, the contents will be clipped to this region. The BleedBox is similar to the CropBox, but is the rectangle used in a production environment.

The TrimBox indicates the intended dimensions of the finished page after trimming, and the ArtBox defines the extent of the page's meaningful content as intended by the page's creator.

PDF version behavior: BleedBox, TrimBox, and ArtBox page dictionary entries require PDF 1.3. When a lower unlocked document version is active, SetPageBox automatically raises the document to PDF 1.3 and records the selected boundary box in AutoBumpedFeatures. If the caller locks PDF 1.2, the compatibility gate rejects the save with LastErrorCode 602.

Syntax

Delphi

function TPDFlib.SetPageBox(BoxType: Integer; Left, Top, Width, Height: Double): Integer;

ActiveX

Function PDFlib::SetPageBox(BoxType As Long, Left As Double, Top As Double, Width As Double, Height As Double) As Long

DLL

int DLSetPageBox(int InstanceID, int BoxType, double Left, double Top, double Width, double Height);

Parameters

BoxType1 = MediaBox 2 = CropBox 3 = BleedBox 4 = TrimBox 5 = ArtBox
LeftThe horizontal co-ordinate of the left edge of the rectangle
TopThe vertical co-ordinate of the top edge of the rectangle
WidthThe width of the rectangle The height of the rectangle
Height