DASetPageBox
Direct access functionality, Page properties
Description
Sets the dimensions of the specified 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.
Syntax
Delphi
function TPDFlib.DASetPageBox(FileHandle, PageRef, BoxIndex: Integer; X1, Y1, X2, Y2: Double): Integer;ActiveX
Function PDFlib::DASetPageBox(FileHandle As Long, PageRef As Long, BoxIndex As Long, X1 As Double, Y1 As Double, X2 As Double, Y2 As Double) As LongDLL
int DLDASetPageBox(int InstanceID, int FileHandle, int PageRef, int BoxIndex, double X1, double Y1, double X2, double Y2);Parameters
| FileHandle | A handle returned by the DAOpenFile, DAOpenFileReadOnly or DAOpenFromStream functions |
|---|---|
| PageRef | A page reference returned by the DAFindPage or DANewPage functions |
| BoxIndex | 1 = MediaBox 2 = CropBox 3 = BleedBox 4 = TrimBox 5 = ArtBox |
| X1 | The horizontal coordinate of the bottom left corner of the box measured in points from the left edge of the page |
| Y1 | The vertical coordinate of the bottom left corner of the box measured in points from the bottom of the page |
| X2 | The horizontal coordinate of the top right corner of the box measured in points from the bottom of the page |
| Y2 | The vertical coordinate of the top right corner of the box measured in points from the bottom of the page |
Return values
| 0 | The FileHandle or PageRef parameters were invalid |
|---|---|
| 1 | Success |