DACapturePageEx

Direct access functionality, Page manipulation

Description

Captures the specified page from a document originally opened with DAOpenFile. The captured page is hidden, but can then be drawn onto any other page using the DADrawCapturedPage function. The "media box" for the page is used as the bounding rectangle for the capture page. The DACapturePageEx function can be used in cases where the "crop box" for the page should be used instead.

Syntax

Delphi

function TPDFlib.DACapturePageEx(FileHandle, PageRef, Options: Integer): Integer;

ActiveX

Function PDFlib::DACapturePageEx(FileHandle As Long, PageRef As Long, Options As Long) As Long

DLL

int DLDACapturePageEx(int InstanceID, int FileHandle, int PageRef, int Options);

Parameters

FileHandleA handle returned by the DAOpenFile, DAOpenFileReadOnly or DAOpenFromStream functions
PageRefA page reference returned by the DAFindPage or DANewPage functions
Options0 = Use the page's media box for the bounding rectangle 1 = Use the page's crop box for the bounding rectangle if it has one, otherwise use the media box 2 = Use the page's bleed box for the bounding rectangle if it has one, otherwise use the crop box 3 = Use the page's trim box for the bounding rectangle if it has one, otherwise use the crop box 4 = Use the page's art box for the bounding rectangle if it has one, otherwise use the crop box

Return values

0The specified FileHandle or PageRef were not valid, or the specified page was the only page in the document
Non-zeroAn ID that can be used with the DADrawCapturedPage function