PDFium Delphi Component Docs

ImportPages 方法

组件: TPdf  ·  单元: PDFium
将另一个已打开的 TPdf 中的一页或多页复制到此文档

语法

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

说明

将另一个已打开的 TPdf 中的一页或多页复制到此文档

传入空的 Range 以导入每一页,或传入从 1 开始计数的范围字符串(如 '1-3,5');PageNumber 是从 1 开始计数的目标插入页码

对当前页面的所有编辑都缓存在 PDFium 的内存表示中。调用 UpdatePage 刷新渲染缓存,调用 SaveAs 持久化更改

备注

示例

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

参见

AddPage, DeletePage, ImportPreferences