Debenu Quick PDF logo

CapturePage

Page manipulation

Description

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 CapturePage 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.

Syntax

Delphi

function TDebenuPDFLibrary1811.CapturePage(Page: Integer): Integer;

ActiveX

Function DebenuPDFLibrary1811.PDFLibrary::CapturePage(Page As Long) As Long

DLL

int DPLCapturePage(int InstanceID, int Page)

Parameters

Page The page number to capture. The first page in the document is page 1.

Return values

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.

Copyright © 2020 Debenu. All rights reserved. AboutContactBlogNewsletterSupport