Debenu Quick PDF logo

DASetPageBox

Direct access functionality, Page properties

Version history

This function was introduced in Quick PDF Library version 7.22.

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.

Note that the parameters of this function are different to the SetPageBox function. This function uses X2 and Y2 rather than Width and Height.

By default coordinates are measured in points from the bottom left corner of the page, this can be changed using the SetGlobalOrigin and SetGlobalMeasurementUnits function.

Syntax

Delphi

function TDebenuPDFLibrary1811.DASetPageBox(FileHandle, PageRef, BoxIndex: Integer; 
  X1, Y1, X2, Y2: Double): Integer;

ActiveX

Function DebenuPDFLibrary1811.PDFLibrary::DASetPageBox(FileHandle As Long,
  PageRef As Long, BoxIndex As Long, X1 As Double, Y1 As Double,
  X2 As Double, Y2 As Double) As Long

DLL

int DPLDASetPageBox(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
Y1 The vertical coordinate of the bottom left corner of the box
X2 The horizontal coordinate of the top right corner of the box
Y2 The vertical coordinate of the top right corner of the box

Return values

0 The FileHandle or PageRef parameters were invalid
1 Success

Copyright © 2020 Debenu. All rights reserved. AboutContactBlogNewsletterSupport