PDFium Delphi Component 文件

ValidatePagePlan 方法

组件: TPdf  ·  单元: PDFium

语法

function ValidatePagePlan(const Plan: TPdfPagePlan; ImportedSource: TPdf = nil; AllowSignedDocument: Boolean = False): TPdfPagePlanValidationReport;

说明

将删除、移动、插入、拆分或合并计划编译为精确的从 1 开始的旧页到新页映射,而不更改目标或源文档

使用 TPdfPagePlan.DeletePages、MovePages、InsertPages 或 InsertSourcePages 从零基页码索引构建计划;计划携带 Operation、PageIndices、DestinationIndex 和 InsertedPageCount

结果

NewPageNumbers 包含每个原始页面新的从 1 开始的页码,被删除的页面为 0

该报告公开 Valid、Decision、ErrorMessage、Operation、OriginalPageCount、ResultPageCount、DeletedPageCount、MovedPageCount、InsertedPageCount、FirstChangedPageNumber 和 Impacts

它会统计书签(BookmarkCount、AffectedBookmarkCount、DanglingBookmarkCount)、命名目标(NamedDestinationCount、AffectedNamedDestinationCount、DanglingNamedDestinationCount)、页面标签(PageLabelCount、AffectedPageLabelCount)、表单字段(FormFieldCount、AffectedFormFieldCount)和标记页面(TaggedPageCount、AffectedTaggedPageCount),外加导入功能计数器 ImportedBookmarkCount、ImportedNamedDestinationCount、ImportedPageLabelCount、ImportedFormFieldCount、ImportedTaggedPageCount、ImportedSignatureCount 和 ImportedFeaturesUnknown,并返回 ppdAllow、ppdReview 或 ppdReject

安全性

当索引无效、导航目标会变为悬空,或在未设置 AllowSignedDocument 的情况下签名内容将发生变化时,计划会被拒绝

没有活动源清单的插入会标记为 ppiImportedFeaturesUnknown 并需要审查

参见

MovePages, ImportPagesByIndex, MergeFiles