PDFium Delphi Component Docs

ImportPages method

Component: TPdf  ·  Unit: PDFium
Copies one or more pages from another open TPdf into this document

Syntax

function ImportPages(Pdf: TPdf; const Range: string; PageNumber: Integer = 1): Boolean;

Description

Copies one or more pages from another open TPdf into this document

Pass an empty Range to import every page, or pass a 1-based range string such as '1-3,5'; PageNumber is the 1-based destination insertion page

All edits to the current page are buffered in PDFium's in-memory representation. Call UpdatePage to refresh the rendering cache and SaveAs to persist the changes

Remarks

Example

begin
  if Pdf1.Active and SourcePdf.Active then
    Pdf1.ImportPages(SourcePdf, '1-3', 1);
end;

See Also

AddPage, DeletePage, ImportPreferences