PDFium Component Docs

Page Eigenschap

Deze API-entry behoudt identifiers, signatures, codeblokken en PDF-termen in hun oorspronkelijke vorm.
Component: TPdf  ·  Unit: PDFium
Native PDFium-paginahandle voor de momenteel actieve pagina

Syntaxis

property Page: FPDF_PAGE; // read only

Beschrijving

Page geeft de ruwe PDFium-FPDF_PAGE-handle vrij die aan de momenteel actieve pagina is gekoppeld. De handle wordt toegewezen wanneer PageNumber wordt ingesteld of wanneer Active naar True schakelt en blijft bestaan zolang die paginakoppeling actief is. Dit is dezelfde handle die de C API van PDFium verwacht voor elke FPDFPage_*, FPDF_RenderPage*, annotatie-, contentstream- en form-widgetaanroep

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 niet FPDF_ClosePage aan op deze handle — de component bezit zijn levensduur en zal deze automatisch afbreken.

Page is an advanced property useful when calling PDFium APIs that PDFiumPas 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.

Opmerkingen

Voorbeeld

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)]));

Zie ook

Document, PageNumber, TextPage, FormHandle