Docs PDFiumVCL

Page property

Questa voce API conserva identificatori, firme, blocchi di codice e termini PDF nella forma originale.
Component: TPdf  ·  Unit: PDFium
Native PDFium page handle for the currently active page.

Syntax

property Page: FPDF_PAGE; // read only

Description

Page exposes the raw PDFium FPDF_PAGE handle bound to the currently active page. The handle is allocated when PageNumber is set (or when Active transitions to True) and is kept alive for the lifetime of that page binding. It is the same handle that PDFium’s C API expects for every FPDFPage_*, FPDF_RenderPage*, annotation, content stream, and form widget call.

The handle is valid only while Active is True and a valid PageNumber is set. Assigning a new PageNumber, calling ReloadPage, or setting Active back to False destroys the existing handle and (in the first two cases) creates a new one. Do not call FPDF_ClosePage on this handle — the component owns its lifetime and will tear it down automatically.

Page is an advanced property useful when calling PDFium APIs that PDFiumVCL has not yet wrapped — for example custom appearance stream regeneration, page-object bookkeeping, or low-level text-extraction tweaks. Most callers should prefer the high-level properties (PageWidth, PageHeight, RenderToBitmap, Annotation, etc.) which already manage the handle correctly.

Remarks

Example

var P: FPDF_PAGE;
Pdf1.Active := True;
Pdf1.PageNumber := 1;
P := Pdf1.Page;
if Assigned(P) then
  ShowMessage(Format('%.0f x %.0f points',
    [FPDF_GetPageWidth(P), FPDF_GetPageHeight(P)]));

See Also

Document, PageNumber, TextPage, FormHandle