PDFium Delphi Component Docs

FPdfProduction jednotka

Ohraničené produkčné pracovné toky pre grafiku, obsah dokumentov, interaktívne balíky a vložené médiá

Exception and enumerations

DeclarationValues or purpose
EPdfProductionVýnimka vyvolaná pri neplatnom produkčnom vstupe, vyčerpaných bezpečnostných rozpočtoch, nepodporovaných operáciách a odmietnutom výstupe backendu
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

Colour conversion declarations

DeclarationPublic fields or members
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

Font and SVG declarations

DeclarationPublic fields or members
TPdfGlyphInfoGlyphID: Cardinal, UnicodeValue: Cardinal, Width: Integer
TPdfGlyphInfosDynamic array of TPdfGlyphInfo
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
TPdfSvgPathCommandsDynamic array of TPdfSvgPathCommand

Styled replacement and XFA declarations

DeclarationPublic fields or members
TPdfStyledSpanPageIndex: Integer, ObjectIndex: Integer, CharacterStart: Integer, Text: WideString, StyleID: Integer
TPdfStyledSpansDynamic array of TPdfStyledSpan
TPdfRegexMatchStartIndex: Integer, Length: Integer, Replacement: WideString
TPdfRegexMatchesDynamic array of TPdfRegexMatch
TPdfStyledReplacementMode: TPdfReplacementMode, PageIndex: Integer, FirstObjectIndex: Integer, LastObjectIndex: Integer, FirstCharacter: Integer, CharacterCount: Integer, Replacement: WideString, StyleID: Integer, LastPageIndex: Integer
TPdfStyledReplacementsDynamic array of TPdfStyledReplacement
TPdfXfaBindingSomPath: string, Value: string
TPdfXfaBindingsDynamic array of TPdfXfaBinding

Barcode and Portfolio declarations

DeclarationPublic fields or members
TPdfBarcodeRectLeft: Double, Top: Double, Right: Double, Bottom: Double
TPdfBarcodeRectsDynamic array of TPdfBarcodeRect
TPdfBarcodeResultKind: TPdfBarcodeKind, Text: string, Bounds: TPdfBarcodeRect, Confidence: Double
TPdfBarcodeResultsDynamic array of TPdfBarcodeResult
TPdfPortfolioFieldName: string, DisplayName: string, FieldType: TPdfPortfolioFieldType, Order: Integer, Visible: Boolean, Editable: Boolean
TPdfPortfolioFieldsDynamic array of TPdfPortfolioField
TPdfPortfolioValueFieldName: string, Value: string
TPdfPortfolioValuesDynamic array of TPdfPortfolioValue
TPdfPortfolioItemFileName: string, Description: string, Values: TPdfPortfolioValues, EmbeddedData: TBytes
TPdfPortfolioItemsDynamic array of TPdfPortfolioItem
TPdfPortfolioFields: TPdfPortfolioFields, Items: TPdfPortfolioItems, SortField: string, SortAscending: Boolean

RichMedia declarations

DeclarationPublic fields
TPdfRichMediaAssetName: string, MimeType: string, Data: TBytes, IsExternal: Boolean, ActivationCondition: string, DefaultView: string
TPdfRichMediaAssetsDynamic array of TPdfRichMediaAsset
TPdfRichMediaExtractedName: string, MimeType: string, Size: Int64, Sha256: string
TPdfRichMediaExtractedArrayDynamic array of TPdfRichMediaExtracted

Backend interfaces

InterfaceMethodPurpose
IPdfColourTransformfunction Transform(const Source: TPdfColourBuffer; TargetSpace: TPdfColourSpace; const TargetProfile: TBytes; out Target: TPdfColourBuffer): BooleanKonvertuje overený zdrojový buffer do požadovaného farebného priestoru a profilu
IPdfFontSubsetBackendfunction Subset(const FontProgram: TBytes; const Glyphs: TPdfGlyphInfos; out SubsetProgram: TBytes): BooleanZostaví fontový program obsahujúci uzáver požadovaných glyfov
IPdfRegexEnginefunction FindMatches(const Text, Pattern, Replacement: WideString; MaxMatches: Integer): TPdfRegexMatchesVráti ohraničené zhody regulárneho výrazu a náhradný text
IPdfBarcodeProviderfunction Generate(Kind: TPdfBarcodeKind; const Text: string; ModuleSize: Double; out Rects: TPdfBarcodeRects): BooleanVygeneruje obdĺžniky modulov čiarového kódu pre podporovanú symbológiu
function Recognise(const Pixels: TBytes; Width, Height, Stride: Integer; MaxResults: Integer): TPdfBarcodeResultsRozozná ohraničené výsledky čiarových kódov z pixelového buffera vlastneného volajúcim

Default option factories

MemberPurpose
class function TPdfColourConversionOptions.Default: TPdfColourConversionOptionsVráti ohraničené predvolené hodnoty konverzie farieb so zapnutým zachovaním zdroja
class function TPdfFontSubsetOptions.Default: TPdfFontSubsetOptionsVráti ohraničené limity fontov a glyfov s minimálnou prahovou úsporou

Top-level routines

SignatureDescription
function ConvertPdfColourBuffer(const Source: TPdfColourBuffer; TargetSpace: TPdfColourSpace; const TargetProfile: TBytes; Transform: IPdfColourTransform; const Options: TPdfColourConversionOptions; out Target: TPdfColourBuffer; out OutputIntent: TPdfOutputIntent; out Report: TPdfColourConversionReport): BooleanPrevedie farebný buffer transformáciou volajúceho a zostaví zodovedajúce dáta OutputIntent, pričom pri zlyhaní zachová zdroj
function SubsetExistingPdfFont(const FontProgram: TBytes; const UsedGlyphs: TPdfGlyphInfos; Backend: IPdfFontSubsetBackend; const Options: TPdfFontSubsetOptions; out ResultProgram: TBytes; out GlyphClosure: TPdfGlyphInfos; out Report: TPdfFontSubsetReport): BooleanZostaví zoradený uzáver jedinečných glyfov a prijme podmnožinu len vtedy, keď je platná a menšia
function ParsePdfSvgPath(const Data: string; MaxCommands: Integer = 100000): TPdfSvgPathCommandsRozanalyzuje ohraničené príkazy move, line, cubic, quadratic a close s podporou relatívnych súradníc
function ExportPdfSvgPath(const Commands: TPdfSvgPathCommands): stringSerializuje príkazy cesty do absolútnej syntaxe SVG cesty
procedure TransformPdfSvgPath(var Commands: TPdfSvgPathCommands; A, B, C, D, E, F: Double)Aplikuje afinnú maticu na každú súradnicu rozanalyzovanej SVG cesty
function BuildStyledRegexReplacementPlan(const Spans: TPdfStyledSpans; const Pattern, Replacement: WideString; Engine: IPdfRegexEngine; MaxCharacters: Integer = 16 * 1024 * 1024; MaxMatches: Integer = 100000): TPdfStyledReplacementsPremapuje zhody regulárneho výrazu späť na štýlované rozsahy stránových objektov a vyberie natívnu alebo redakčnú náhradu
function MergePdfXfaDatasets(const Packets: TXfaPacketList; const Bindings: TPdfXfaBindings; MaxPacketBytes: Integer = 32 * 1024 * 1024): TXfaPacketListZlúči eskapované SOM väzby listov pri zachovaní všetkých nedotknutých XFA paketov
function RewritePdfXfaPacketStreams(Source, Destination: TStream; const Packets: TXfaPacketList; MaxTotalPacketBytes: Int64 = 256 * 1024 * 1024): BooleanTransakčne pridá nahradené streamy XFA paketov nešifrovaného PDF
function GeneratePdfBarcode(Kind: TPdfBarcodeKind; const Text: string; ModuleSize: Double; Provider: IPdfBarcodeProvider = nil): TPdfBarcodeRectsVygeneruje vstavané vektory Code 128-B a deleguje dvojrozmerné symbológie na poskytovateľa
function RecognisePdfBarcodes(const Pixels: TBytes; Width, Height, Stride: Integer; Provider: IPdfBarcodeProvider; MaxResults: Integer = 256): TPdfBarcodeResultsDeleguje rozpoznávanie čiarových kódov pri vynútení geometrie obrazu a limitov výsledkov
procedure ValidatePdfPortfolio(const Portfolio: TPdfPortfolio; MaxItems: Integer = 100000; MaxEmbeddedBytes: Int64 = 1024 * 1024 * 1024)Overí definície polí, hodnoty, počty položiek a rozpočty vložených dát
procedure SortPdfPortfolio(var Portfolio: TPdfPortfolio)Vytvorí deterministické zobrazenie Collection pomocou nakonfigurovaného poľa a smeru zoraďovania
function ExtractPdfRichMediaAssets(const Assets: TPdfRichMediaAssets; const OutputDirectory: string; MaxAssetBytes: Int64 = 256 * 1024 * 1024; MaxTotalBytes: Int64 = 1024 * 1024 * 1024): TPdfRichMediaExtractedArrayZapíše vložené prostriedky bez vykonávania obsahu, riešenia externých odkazov alebo umožnenia úniku z adresára

Safety model

Všetky API s veľkým objemom vynucujú pre volajúceho viditeľné limity pred alokáciou alebo zápisom výstupu

Platformové kodeky, farebné enginy, nástroje na podmnožiny fontov, enginy regulárnych výrazov, knižnice maticových čiarových kódov a rozpoznávače sú explicitné rozhrania, takže hostitelia si môžu zvoliť svoj auditovaný backend