PDFium Delphi Component Docs

FPdfProduction ユニット

グラフィックス、ドキュメントコンテンツ、インタラクティブパッケージ、埋め込みメディアのための上限付きプロダクションワークフローです

例外と列挙型

宣言値または目的
EPdfProduction無効なプロダクション入力、安全予算の枯渇、未対応の操作、拒否されたバックエンド出力に対して発生する例外です
TPdfColourSpacepcsDeviceGray, pcsDeviceRGB, pcsDeviceCMYK, pcsICCBased, pcsSeparation, pcsDeviceN
TPdfSvgPathCommandKindspcMoveTo, spcLineTo, spcCubicTo, spcQuadraticTo, spcClosePath
TPdfReplacementModeprmNativeTextObject, prmRedactAndRelayout
TPdfBarcodeKindpbkCode128, pbkQr, pbkDataMatrix, pbkPdf417
TPdfPortfolioFieldTypeppftText, ppftNumber, ppftDate, ppftFileName, ppftDescription, ppftSize, ppftModDate, ppftCreationDate

カラー変換宣言

オプションの LittleCMS プロバイダーはバッファ変換インターフェイスを実装し、FPdfDocumentColour は元の文書オペレーターと画像成分に適用して、完了状況を明示的に報告します

宣言公開フィールドまたはメンバー
TPdfColourBufferSpace: TPdfColourSpace, Components: Integer, BitsPerComponent: Integer, Samples: TBytes, IccProfile: TBytes
TPdfOutputIntentIdentifier: string, RegistryName: string, Info: string, Components: Integer, IccProfile: TBytes
TPdfColourConversionOptionsMaxInputBytes: Integer, MaxOutputBytes: Integer, PreserveOnFailure: Boolean, class function Default: TPdfColourConversionOptions
TPdfColourConversionReportConverted: Boolean, PreservedOriginal: Boolean, InputBytes: Integer, OutputBytes: Integer, ErrorMessage: string

フォントと SVG の宣言

宣言公開フィールドまたはメンバー
TPdfGlyphInfoGlyphID: Cardinal, UnicodeValue: Cardinal, Width: Integer
TPdfGlyphInfosTPdfGlyphInfo の動的配列です
TPdfFontSubsetOptionsMaxFontBytes: Integer, MaxGlyphs: Integer, MinimumSavingPercent: Integer, class function Default: TPdfFontSubsetOptions
TPdfFontSubsetReportApplied: Boolean, PreservedOriginal: Boolean, GlyphCount: Integer, OriginalBytes: Integer, SubsetBytes: Integer, ErrorMessage: string
TPdfSvgPathCommandKind: TPdfSvgPathCommandKind, Values: array[0..5] of Double
TPdfSvgPathCommandsTPdfSvgPathCommand の動的配列です

スタイル付き置換と XFA の宣言

宣言公開フィールドまたはメンバー
TPdfStyledSpanPageIndex: Integer, ObjectIndex: Integer, CharacterStart: Integer, Text: WideString, StyleID: Integer
TPdfStyledSpansTPdfStyledSpan の動的配列です
TPdfRegexMatchStartIndex: Integer, Length: Integer, Replacement: WideString
TPdfRegexMatchesTPdfRegexMatch の動的配列です
TPdfStyledReplacementMode: TPdfReplacementMode, PageIndex: Integer, FirstObjectIndex: Integer, LastObjectIndex: Integer, FirstCharacter: Integer, CharacterCount: Integer, Replacement: WideString, StyleID: Integer, LastPageIndex: Integer
TPdfStyledReplacementsTPdfStyledReplacement の動的配列です
TPdfXfaBindingSomPath: string, Value: string
TPdfXfaBindingsTPdfXfaBinding の動的配列です

バーコードと Portfolio の宣言

宣言公開フィールドまたはメンバー
TPdfBarcodeRectLeft: Double, Top: Double, Right: Double, Bottom: Double
TPdfBarcodeRectsTPdfBarcodeRect の動的配列です
TPdfBarcodeResultKind: TPdfBarcodeKind, Text: string, Bounds: TPdfBarcodeRect, Confidence: Double
TPdfBarcodeResultsTPdfBarcodeResult の動的配列です
TPdfPortfolioFieldName: string, DisplayName: string, FieldType: TPdfPortfolioFieldType, Order: Integer, Visible: Boolean, Editable: Boolean
TPdfPortfolioFieldsTPdfPortfolioField の動的配列です
TPdfPortfolioValueFieldName: string, Value: string
TPdfPortfolioValuesTPdfPortfolioValue の動的配列です
TPdfPortfolioItemFileName: string, Description: string, Values: TPdfPortfolioValues, EmbeddedData: TBytes
TPdfPortfolioItemsTPdfPortfolioItem の動的配列です
TPdfPortfolioFields: TPdfPortfolioFields, Items: TPdfPortfolioItems, SortField: string, SortAscending: Boolean

RichMedia の宣言

宣言公開フィールド
TPdfRichMediaAssetName: string, MimeType: string, Data: TBytes, IsExternal: Boolean, ActivationCondition: string, DefaultView: string
TPdfRichMediaAssetsTPdfRichMediaAsset の動的配列です
TPdfRichMediaExtractedName: string, MimeType: string, Size: Int64, Sha256: string
TPdfRichMediaExtractedArrayTPdfRichMediaExtracted の動的配列です

バックエンドインターフェイス

インターフェイスメソッド目的
IPdfColourTransformfunction Transform(const Source: TPdfColourBuffer; TargetSpace: TPdfColourSpace; const TargetProfile: TBytes; out Target: TPdfColourBuffer): Boolean検証済みのソースバッファを要求されたカラースペースとプロファイルへ変換します
IPdfFontSubsetBackendfunction Subset(const FontProgram: TBytes; const Glyphs: TPdfGlyphInfos; out SubsetProgram: TBytes): Boolean要求されたグリフ閉包を含むフォントプログラムを構築します
IPdfRegexEnginefunction FindMatches(const Text, Pattern, Replacement: WideString; MaxMatches: Integer): TPdfRegexMatches上限付きの正規表現マッチと置換テキストを返します
IPdfBarcodeProviderfunction 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最小削減しきい値付きの、上限付きフォントとグリフの制限を返します

トップレベルルーチン

シグネチャ説明
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ソート済みの一意なグリフ閉包を構築し、有効かつ小さい場合にのみサブセットを受け入れます
function ParsePdfSvgPath(const Data: string; MaxCommands: Integer = 100000): TPdfSvgPathCommands相対座標に対応した move、line、cubic、quadratic、close コマンドを上限付きで解析します
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 リーフバインディングをマージしながら、手つかずの 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 ベクトルを生成し、2 次元シンボルをプロバイダーへ委譲します
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 ビューを作成します
function ExtractPdfRichMediaAssets(const Assets: TPdfRichMediaAssets; const OutputDirectory: string; MaxAssetBytes: Int64 = 256 * 1024 * 1024; MaxTotalBytes: Int64 = 1024 * 1024 * 1024): TPdfRichMediaExtractedArrayコンテンツを実行せず、外部参照を解決せず、ディレクトリ脱出を許可せずに、埋め込みアセットを書き出します

FPdfBarcodeZXing は任意のバーコード生成/認識プロバイダーを提供します

安全モデル

大量処理 API はすべて、出力の割り当てや書き込みの前に、呼び出し側から見える制限を強制します

プラットフォームコーデック、カラーエンジン、フォントサブセッター、正規表現エンジン、マトリクスバーコードライブラリ、認識エンジンは明示的なインターフェイスであり、ホストは監査済みのバックエンドを選択できます

FPdfStyledEdit は検証済みソース snapshot に対して計画を実行し、preview、フォント再利用または明示的 fallback、上限付き fitting、トランザクションの保存/再読み込み検証を行います