This function "captures" a page. Once the page has been captured it can be drawn onto other pages. This is useful for combining different pages or for placing more than one original page onto another page (imposition). Once a page has been captured it is removed from the document. If you would like the page to remain in the document you must create a blank page and draw the captured page onto the blank page.
Also, because a document must have at least one page at all times it is not possible to capture a page if it is the only page in the document. In this case, you must add a new blank page before the existing page can be captured.
You cannot use CapturePage to move pages from one document to another new document so all the required pages must be merged into a single document before calling CapturePage. The CaptureID is just a pointer to a hidden page therefore memory does not need to be released.
The "media box" for the page is used as the bounding rectangle for the captured page. The CapturePageEx function can be used in cases where the "crop box" for the page should be used instead.
If a document has an open action set to the captured page the resulting file will not load correctly in Acrobat and other PDF viewers. Calling RemoveOpenAction will remove the open action allowing the file to be opened.
function TDebenuPDFLibrary1811.CapturePageEx(Page, Options: Integer): Integer;
Function DebenuPDFLibrary1811.PDFLibrary::CapturePageEx(Page As Long,
Options As Long) As Long
int DPLCapturePageEx(int InstanceID, int Page, int Options)
|Page||The page number to capture. The first page in the document is page 1.|
0 = 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
|0||The specified page does not exist, or it is the only page in the document|
|Non-zero||The ID of the capture process. This ID must be supplied to the DrawCapturedPage function.|