| 声明 | 取值或用途 |
|---|---|
EPdfProduction | 在生产输入无效、安全预算耗尽、操作不受支持或后端输出被拒绝时引发的异常 |
TPdfColourSpace | pcsDeviceGray, pcsDeviceRGB, pcsDeviceCMYK, pcsICCBased, pcsSeparation, pcsDeviceN, pcsLab |
TPdfSvgPathCommandKind | spcMoveTo, spcLineTo, spcCubicTo, spcQuadraticTo, spcClosePath |
TPdfReplacementMode | prmNativeTextObject, prmRedactAndRelayout |
TPdfBarcodeKind | pbkCode128, pbkQr, pbkDataMatrix, pbkPdf417 |
TPdfPortfolioFieldType | ppftText, ppftNumber, ppftDate, ppftFileName, ppftDescription, ppftSize, ppftModDate, ppftCreationDate |
可选的 LittleCMS 提供器实现缓冲区转换接口,FPdfDocumentColour 将其应用于原始文档操作符和图像分量,并明确报告是否转换完整
| 声明 | 公开字段或成员 |
|---|---|
pcsLab | ICC v4 D50 PCS Lab 源,带三个本机字节序的 16-bit 分量,且不含源配置文件字节;L 使用 L*655.35,a/b 使用 (value+128)*257 |
TPdfColourBuffer | Space: TPdfColourSpace, Components: Integer, BitsPerComponent: Integer, Samples: TBytes, IccProfile: TBytes |
TPdfOutputIntent | Identifier: string, RegistryName: string, Info: string, Components: Integer, IccProfile: TBytes |
TPdfColourConversionOptions | MaxInputBytes: Integer, MaxOutputBytes: Integer, PreserveOnFailure: Boolean, class function Default: TPdfColourConversionOptions |
TPdfColourConversionReport | Converted: Boolean, PreservedOriginal: Boolean, InputBytes: Integer, OutputBytes: Integer, ErrorMessage: string |
TPdfTrueTypeSubsetBackend 提供带复合闭包、保留 ID 的轮廓子集化;SubsetPdfDocumentFonts 把它应用到经过验证的嵌入文档资源上
| 声明 | 公开字段或成员 |
|---|---|
TPdfGlyphInfo | GlyphID: Cardinal, UnicodeValue: Cardinal, Width: Integer |
TPdfGlyphInfos | TPdfGlyphInfo 的动态数组 |
TPdfFontSubsetOptions | MaxFontBytes: Integer, MaxGlyphs: Integer, MinimumSavingPercent: Integer, RestrictToContentStreamUsage: Boolean, class function Default: TPdfFontSubsetOptions |
TPdfFontSubsetReport | Applied: Boolean, PreservedOriginal: Boolean, GlyphCount: Integer, OriginalBytes: Integer, SubsetBytes: Integer, ErrorMessage: string |
TPdfSvgPathCommand | Kind: TPdfSvgPathCommandKind, Values: array[0..5] of Double |
TPdfSvgPathCommands | TPdfSvgPathCommand 的动态数组 |
IPdfFontSubsetClosureBackend 可选扩展后端,增加 function SubsetWithClosure(const FontProgram: TBytes; const Glyphs: TPdfGlyphInfos; out SubsetProgram: TBytes; out GlyphClosure: TPdfGlyphInfos; out ErrorMessage: string): Boolean,返回实际排序去重后的依赖
SubsetExistingPdfFont 使用稳定排序保留重复 glyph ID 的首个元数据,校验扩展闭包预算和请求 glyph 覆盖情况,并在接受更小的程序之前报告实际闭包数量
| 声明 | 公开字段或成员 |
|---|---|
TPdfStyledSpan | PageIndex: Integer, ObjectIndex: Integer, CharacterStart: Integer, Text: WideString, StyleID: Integer |
TPdfStyledSpans | TPdfStyledSpan 的动态数组 |
TPdfRegexMatch | StartIndex: Integer, Length: Integer, Replacement: WideString |
TPdfRegexMatches | TPdfRegexMatch 的动态数组 |
TPdfStyledReplacement | Mode: TPdfReplacementMode, PageIndex: Integer, FirstObjectIndex: Integer, LastObjectIndex: Integer, FirstCharacter: Integer, CharacterCount: Integer, Replacement: WideString, StyleID: Integer, LastPageIndex: Integer |
TPdfStyledReplacements | TPdfStyledReplacement 的动态数组 |
TPdfXfaBinding | SomPath: string, Value: string |
TPdfXfaBindings | TPdfXfaBinding 的动态数组 |
FPdfDocumentAssets 为这些模型提供文档级 Collection 读写和 RichMedia 发现
| 声明 | 公开字段或成员 |
|---|---|
TPdfBarcodeRect | Left: Double, Top: Double, Right: Double, Bottom: Double |
TPdfBarcodeRects | TPdfBarcodeRect 的动态数组 |
TPdfBarcodeResult | Kind: TPdfBarcodeKind, Text: string, Bounds: TPdfBarcodeRect, Confidence: Double |
TPdfBarcodeResults | TPdfBarcodeResult 的动态数组 |
TPdfPortfolioField | Name: string, DisplayName: string, FieldType: TPdfPortfolioFieldType, Order: Integer, Visible: Boolean, Editable: Boolean |
TPdfPortfolioFields | TPdfPortfolioField 的动态数组 |
TPdfPortfolioValue | FieldName: string, Value: string, Prefix: string |
TPdfPortfolioValues | TPdfPortfolioValue 的动态数组 |
TPdfPortfolioItem | Key: string, FileName: string, Description: string, AFRelationship: string, FolderID: Integer, Values: TPdfPortfolioValues, EmbeddedData: TBytes, MimeType: string, CreationDate: string, ModificationDate: string, IsExternal: Boolean |
TPdfPortfolioItems | TPdfPortfolioItem 的动态数组 |
TPdfPortfolioSplitDirection | (ppsdNone, ppsdHorizontal, ppsdVertical) |
TPdfPortfolioFolder | ID: Integer、ParentID: Integer、Name: string、Description: string、CreationDate: string、ModificationDate: string、Values: TPdfPortfolioValues |
TPdfPortfolioFolders | TPdfPortfolioFolder 的动态数组 |
TPdfPortfolioSortField | Name: string、Ascending: Boolean |
TPdfPortfolioSortFields | TPdfPortfolioSortField 的动态数组 |
TPdfPortfolio | Fields: TPdfPortfolioFields, Items: TPdfPortfolioItems, Folders: TPdfPortfolioFolders, SortField: string, SortAscending: Boolean, SortFields: TPdfPortfolioSortFields, InitialDocument: string, View: TPdfPortfolioView, HasSplit: Boolean, SplitDirection: TPdfPortfolioSplitDirection, SplitPosition: Double, HasColors: Boolean, BackgroundColor: Cardinal, CardBackgroundColor: Cardinal, CardBorderColor: Cardinal, PrimaryTextColor: Cardinal, SecondaryTextColor: Cardinal |
TPdfPortfolioView 选择 ppvDetails、ppvTiles 或 ppvHidden;Key 独立于 FileName 标识名称树条目,Prefix 保存 Collection 子条目的显示前缀,InitialDocument 选择条目的 Key
| 声明 | 公开字段 |
|---|---|
TPdfRichMediaAsset | Name: string, MimeType: string, Data: TBytes, IsExternal: Boolean, ActivationCondition: string, DefaultView: string |
TPdfRichMediaAssets | TPdfRichMediaAsset 的动态数组 |
TPdfRichMediaExtracted | Name: string, MimeType: string, Size: Int64, Sha256: string |
TPdfRichMediaExtractedArray | TPdfRichMediaExtracted 的动态数组 |
| 接口 | 方法 | 用途 |
|---|---|---|
IPdfColourTransform | function Transform(const Source: TPdfColourBuffer; TargetSpace: TPdfColourSpace; const TargetProfile: TBytes; out Target: TPdfColourBuffer): Boolean | 将已验证的源缓冲区转换到请求的色彩空间和配置文件 |
IPdfColourFloatTransform | function TransformFloat(const Source: TPdfColourBuffer; TargetSpace: TPdfColourSpace; const TargetProfile: TBytes; TargetBitsPerComponent: Integer; out Target: TPdfColourBuffer): Boolean | 自 v3.312.0 起提供的可选接口:每像素三个按原生字节序排列的 IEEE 754 Single PCS Lab 值(物理 Lab 单位),无源配置文件,目标精度可选 8/16 位;基础接口与 ConvertPdfColourBuffer 仍接受整数输入 |
IPdfFontSubsetBackend | function Subset(const FontProgram: TBytes; const Glyphs: TPdfGlyphInfos; out SubsetProgram: TBytes): Boolean | 构建包含请求字形闭包的字体程序 |
IPdfRegexEngine | function FindMatches(const Text, Pattern, Replacement: WideString; MaxMatches: Integer): TPdfRegexMatches | 返回有界的正则表达式匹配和替换文本 |
IPdfBarcodeProvider | function Generate(Kind: TPdfBarcodeKind; const Text: string; ModuleSize: Double; out Rects: TPdfBarcodeRects): Boolean | 为受支持的码制生成条码模块矩形 |
function Recognise(const Pixels: TBytes; Width, Height, Stride: Integer; MaxResults: Integer): TPdfBarcodeResults | 从调用方拥有的像素缓冲区识别有界的条码结果 |
| 成员 | 用途 |
|---|---|
class function TPdfColourConversionOptions.Default: TPdfColourConversionOptions | 返回启用源保留的有界颜色转换默认值 |
class function TPdfFontSubsetOptions.Default: TPdfFontSubsetOptions | 返回带最小节省阈值的有界字体和字形限制;自 v3.207.0 起,实际节省百分比在比较前向下取整,因此非空子集不可能满足 100% 的阈值 |
| 函数签名 | 说明 |
|---|---|
function ConvertPdfColourBuffer(const Source: TPdfColourBuffer; TargetSpace: TPdfColourSpace; const TargetProfile: TBytes; Transform: IPdfColourTransform; const Options: TPdfColourConversionOptions; out Target: TPdfColourBuffer; out OutputIntent: TPdfOutputIntent; out Report: TPdfColourConversionReport): Boolean | 让颜色缓冲区经过调用方转换,构建匹配的 OutputIntent 数据,并在失败时保留源 |
function SubsetExistingPdfFont(const FontProgram: TBytes; const UsedGlyphs: TPdfGlyphInfos; Backend: IPdfFontSubsetBackend; const Options: TPdfFontSubsetOptions; out ResultProgram: TBytes; out GlyphClosure: TPdfGlyphInfos; out Report: TPdfFontSubsetReport): Boolean | 规范化请求的 glyph,从可选的 IPdfFontSubsetClosureBackend 获取依赖,并且只在声明的预算内接受更小的程序 |
function ParsePdfSvgPath(const Data: string; MaxCommands: Integer = 100000): TPdfSvgPathCommands | 解析有界的移动、直线、三次、二次和闭合命令,并支持相对坐标 |
function ExportPdfSvgPath(const Commands: TPdfSvgPathCommands): string | 将路径命令序列化为绝对 SVG 路径语法 |
procedure TransformPdfSvgPath(var Commands: TPdfSvgPathCommands; A, B, C, D, E, F: Double) | 对已解析 SVG 路径中的每个坐标应用仿射矩阵 |
function BuildStyledRegexReplacementPlan(const Spans: TPdfStyledSpans; const Pattern, Replacement: WideString; Engine: IPdfRegexEngine; MaxCharacters: Integer = 16 * 1024 * 1024; MaxMatches: Integer = 100000): TPdfStyledReplacements | 把正则表达式匹配映射回带样式的页面对象范围,并选择原生或基于涂黑的替换 |
function MergePdfXfaDatasets(const Packets: TXfaPacketList; const Bindings: TPdfXfaBindings; MaxPacketBytes: Integer = 32 * 1024 * 1024): TXfaPacketList | 把转义的 SOM 叶子绑定合并进 UTF-8 数据集,支持 SOM 路径里的 Unicode XML 元素名,同时保留每个未改动的 XFA 包 |
function RewritePdfXfaPacketStreams(Source, Destination: TStream; const Packets: TXfaPacketList; MaxTotalPacketBytes: Int64 = 256 * 1024 * 1024): Boolean | 把事务性替换的 XFA 包流追加到未加密 PDF |
function GeneratePdfBarcode(Kind: TPdfBarcodeKind; const Text: string; ModuleSize: Double; Provider: IPdfBarcodeProvider = nil): TPdfBarcodeRects | 生成内置的 Code 128-B 矢量,并把二维码制委托给提供方 |
function RecognisePdfBarcodes(const Pixels: TBytes; Width, Height, Stride: Integer; Provider: IPdfBarcodeProvider; MaxResults: Integer = 256): TPdfBarcodeResults | 在强制图像几何和结果边界的前提下委托条码识别 |
procedure ValidatePdfPortfolio(const Portfolio: TPdfPortfolio; MaxItems: Integer = 100000; MaxEmbeddedBytes: Int64 = 1024 * 1024 * 1024) | 验证字段定义、值、条目数量和嵌入载荷预算 |
procedure SortPdfPortfolio(var Portfolio: TPdfPortfolio) | 按顺序应用配置的排序键并稳定处理平局,创建确定性的 Collection 视图;存在 SortFields 时使用它,否则退回旧的单字段对 |
function ExtractPdfRichMediaAssets(const Assets: TPdfRichMediaAssets; const OutputDirectory: string; MaxAssetBytes: Int64 = 256 * 1024 * 1024; MaxTotalBytes: Int64 = 1024 * 1024 * 1024): TPdfRichMediaExtractedArray | 写出嵌入资产,不执行内容、不解析外部引用,也不允许目录逃逸 |
FPdfBarcodeZXing 提供可选的条码生成和识别提供器
颜色与字体的输入预算会在分配保留副本之前先检查;源 ICC profile 同样受颜色输入字节上限约束
SVG 解析在完成相对坐标运算后拒绝非有限坐标;TransformPdfSvgPath 先校验一份私有候选结果再替换调用方数组,失败时输入及其别名都保持不变
RichMedia 提取会拒绝路径分隔符、控制字符、Windows 保留设备名以及结尾的句点或空格,并以独占方式创建每个输出文件,从校验到创建之间已有文件不会被截断
提取失败时,清理范围包括当前正在写入的文件以及本次调用之前已创建的文件;提取期间调用方必须始终掌控输出目录
平台编解码器、颜色引擎、字体子集化器、正则表达式引擎、矩阵条码库和识别器都是显式接口,宿主可以选择自己审计过的后端
FPdfStyledEdit 针对已验证的源快照执行这些计划,支持预览、字体复用或显式后备、受限适配,以及事务式保存/重新打开验证