Pdf.FileName := 'document.pdf';
Pdf.Password := 'password';
Pdf.Active := True; // PDF-Dokument öffnen
Pdf.PageNumber := 1; // Seite auswählen
ShowMessage(Pdf.Text); // Text extrahieren
type TBookmark = record
Handle: FPDF_BOOKMARK;
Title: WString;
PageNumber: Integer;
Destination: TDestination;
DescendantCount: Integer;
IsOpen: Boolean;
Action: TPdfAction;
ActionPageNumber: Integer;
ActionDestination: TDestination;
ActionPath: WString;
HasColor: Boolean;
Color: TColor;
end;
type TBookmarks = array of TBookmark;
Lesezeichen-Daten
type TDestination = record
Handle: FPDF_DEST;
Name: WString;
PageNumber: Integer;
ViewMode: TPdfDestinationViewMode;
ViewParameterCount: Integer;
ViewParameters: TPdfDestinationViewParameters;
HasX: Boolean;
X: Single;
HasY: Boolean;
Y: Single;
HasZoom: Boolean;
Zoom: Single;
end;
Daten benannter Zielorte
type TPdfDestinationViewMode = (dvmUnknown, dvmXYZ, dvmFit, dvmFitHorizontal, dvmFitVertical, dvmFitRectangle, dvmFitBoundingBox, dvmFitBoundingBoxHorizontal, dvmFitBoundingBoxVertical);
type TPdfDestinationViewParameters = array [0..3] of Single;
Zielorts-Ansichtsmodus und seine geordneten nativen Parameter
type TLinkAnnotation = record
Handle: FPDF_LINK;
Rectangle: TPdfRectangle;
PageNumber: Integer;
Action: TPdfAction;
ActionPageNumber: Integer;
ActionPath: WString;
Points: array of TQuadrilateralPoint;
end;
type TLinkAnnotations = array of TLinkAnnotation;
type TQuadrilateralPoint = array [1..4] of TPdfPoint;
Daten von Link-Annotationen
type TPdfPermission = (permPrint, permModify, permCopy, permAnnotate, permFillForms, permAccessibility, permAssemble, permPrintHighQuality);
type TPdfPermissions = set of TPdfPermission;
Typisierte Dokument-Berechtigungsflags, dekodiert aus der nativen Berechtigungsmaske
type TPdfDocumentMetadata = record
Title: WString;
Author: WString;
Subject: WString;
Keywords: WString;
Creator: WString;
Producer: WString;
CreationDate: WString;
ModifiedDate: WString;
end;
Eine Momentaufnahme der Standardfelder des Info-Dictionarys des Dokuments
type TObjectType = (otUnknown, otText, otPath, otImage, otShading, otForm);
Legt den Typ des PDF-Objekts fest
type TPageMode = (pmNone, pmOutline, pmThumbs, pmFullScreen, pmOptionalContentGroup, pmAttachments, pmUnknown);
Legt fest, wie das PDF-Dokument beim Öffnen angezeigt werden soll
type TPdfAction = (acUnsupported, acGoto, acGotoRemote, acUri, acLaunch);
Legt den Typ der Aktion fest, die einem Lesezeichen-Eintrag zugeordnet ist
type TPdfAnnotation = record
Subtype: TPdfAnnotationSubtype;
Flags: TPdfAnnotationFlags;
HasColor: Boolean;
Color: TColor;
ColorAlpha: Byte;
HasInteriorColor: Boolean;
InteriorColor: TColor;
InteriorColorAlpha: Byte;
HasAttachmentPoints: Boolean;
AttachmentPoints: TQuadrilateralPoint;
Rectangle: TPdfRectangle;
ContentsText: WString;
AuthorText: WString;
end;
Annotation-Daten
type TPdfAnnotationFlag = (afInvisible, afHidden, afPrint, afNoZoom, afNoRotate, afNoView, afReadOnly, afLocked, afToggleNoView);
type TPdfAnnotationFlags = set of TPdfAnnotationFlag;
Annotation-Flags
type TPdfAnnotationSubtype = (anUnknown, anText, anLink, anFreeText, anLine, anSquare, anCircle, anPolygon, anPolyLine, anHighlight, anUnderline, anSquiggly, anStrikeout, anStamp, anCaret, anInk, anPopup, anFileAttachment, anSound, anMovie, anWidget, anScreen, anPrinterMark, anTrapNet, anWaterMark, anThreed, anRichMedia, anXfaWidget, anRedact);
Der Annotation-Subtyp
type TPdfBlendMode = (bmDefault, bmColor, bmColorBurn, bmColorDodge, bmDarken, bmDifference, bmExclusion, bmHardLight, bmHue, bmLighten, bmLuminosity, bmMultiply, bmNormal, bmOverlay, bmSaturation, bmScreen, bmSoftLight);
Legt fest, wie Ebenen ineinander überblendet werden
type TPdfDisplayMode = (dmSingleContinuous, dmTwoPageContinuous, dmTwoPageContinuousWithCover);
Legt fest, wie die Seiten des PDF-Dokuments angezeigt werden
type TPdfFeature = (feUnknown, feXfaForm, fePortableCollection, feAttachment, feSecurity, feSharedReview, feSharedFormAcrobat, feSharedFormFilesystem, feSharedFormEmail, fe3dAnnotation, feMovieAnnotation, feSoundAnnotation, feScreenMediaAnnotation, feScreenRichMediaAnnotation, feAttachmentAnnotation, feSignatureAnnotation);
Funktion des PDF-Dokuments, die vom Ereignis OnUnsupportedFeature gemeldet wird
type TPdfFillMode = (fmNone, fmAlternate, fmWinding);
Legt fest, wie Füllbereiche gebildet werden, wenn sich ein Pfad selbst schneidet
type TPdfFormFieldFlag = (ffReadOnly, ffRequired, ffNoExport, ffMultiline, ffChoiceCombo, ffChoiceEdit, ffPassword, ffChoiceMultiSelect);
type TPdfFormFieldFlags = set of TPdfFormFieldFlag;
Formularfeld-Flags
type TPdfFormFieldInfo = record
Name: WString;
AlternateName: WString;
FieldType: TPdfFormFieldType;
Flags: TPdfFormFieldFlags;
OptionLabels: array of WString;
OptionSelected: array of Boolean;
FontSize: Single;
Checked: Boolean;
ExportValue: WString;
GroupCount: Integer;
GroupIndex: Integer;
end;
Formularfeld-Informationen
type TPdfFormFieldType = (fiUnknown, fiPushButton, fiCheckBox, fiRadioButton, fiComboBox, fiListBox, fiTextField, fiSignature);
Legt den Typ des Formularfelds fest
type TPdfFormType = (ftUnknown, ftNone, ftAcroForm, ftXfaFull, ftXfaForeground);
Legt den Typ der Formulare im PDF-Dokument fest
type TPdfImage = record
Width: Integer;
Height: Integer;
Data: TBytes;
end;
Größe in Pixeln und Daten des PDF-Bildobjekts
type TPdfLineCap = (lcDefault, lcButt, lcRound, lcProjectingSquare);
Die Form an den Enden offener Unterpfade
type TPdfLineJoin = (ljDefault, ljMiter, ljRound, ljBevel);
Die Form an den Ecken von Pfaden, die mit einem Strich gezogen werden
type TPdfPoint = record
X, Y: Double;
end;
Punkt mit X- und Y-Koordinaten
type TPdfRectangle = record
Left, Top, Right, Bottom: Double;
end;
type TPdfRectangles = array of TPdfRectangle;
Rechteckbereich mit den Koordinaten Left, Top, Right und Bottom
type TPdfFileIdentifierType = (fidPermanent, fidChanging);
Selektor für Trailer-Datei-Identifikatoren. fidPermanent liest den ersten /ID-Eintrag und fidChanging den zweiten /ID-Eintrag
type TPdfPageBox = (pbMedia, pbCrop, pbBleed, pbTrim, pbArt);
Selektor für Seitenboxen im Page-Dictionary, verwendet von PageBox, GetPageBox und SetPageBox
type TPdfJavaScriptAction = record
Name: WString;
Script: WString;
end;
type TPdfJavaScriptActions = array of TPdfJavaScriptAction;
Daten von JavaScript-Aktionen des Namensbaums auf Dokumentebene
type TPdfSignature = record
Content: TBytes;
Encoding: WString;
Reason: WString;
Time: WString;
Permission: Integer;
end;
Informationen zur digitalen Signatur
type TPdfIntegerArray = array of Integer;
Integer-Array für Marked-Content-ID-Listen des Strukturbaums
type TPdfSingleArray = array of Single;
Array mit Gleitkommawerten einfacher Genauigkeit für die Zeichenpositionierung von Textobjekten
type TPdfPrintPageRange = record
StartPage: Integer;
EndPage: Integer;
end;
type TPdfPrintPageRanges = array of TPdfPrintPageRange;
Eins-basierte Druckseitenbereiche aus den Viewer-Voreinstellungen des Dokuments
type TPdfStructureElement = record
Level: Integer;
ParentIndex: Integer;
TypeName: WString;
ObjectType: WString;
Title: WString;
AlternateText: WString;
ActualText: WString;
Expansion: WString;
ID: WString;
Language: WString;
MarkedContentID: Integer;
MarkedContentIDs: TPdfIntegerArray;
ChildCount: Integer;
ChildMarkedContentIDs: TPdfIntegerArray;
AttributeCount: Integer;
ListNumbering: WString;
Scope: WString;
HasHeaders: Boolean;
HeadersIds: array of WString;
ColSpan: Integer;
RowSpan: Integer;
HasPrintField: Boolean;
NamespaceUri: WString;
RoleMappedNamespaceUri: WString;
RoleMappedTypeName: WString;
HasReference: Boolean;
HasAssociatedFile: Boolean;
AssociatedFileRelationship: WString;
AssociatedFileDescription: WString;
AnnotationSubtype: WString;
AnnotationContents: WString;
AnnotationAlternateText: WString;
IsArtifact: Boolean;
WidgetCount: Integer;
HasAppearance: Boolean;
LabelText: WString;
FieldAlternateName: WString;
end;
type TPdfStructureElements = array of TPdfStructureElement;
Abgeflachte logische Strukturelementdaten für getaggte PDF-Seiten
type TPdfFormSelectionRect = record
PageNumber: Integer;
Bounds: TPdfRectangle;
end;
Ein vom Aufrufer verwaltetes Rechteck im Seitenraum, das von der nativen Formular-Textauswahl gemeldet wird
type TPdfStructureReadOptions = record
MaxDepth: Integer;
MaxElements: Integer;
MaxAttributeValues: Integer;
DeadlineMilliseconds: Cardinal;
IncludeAttributes: Boolean;
class function Default: TPdfStructureReadOptions; static;
end;
Ressourcenbudgets für die iterative native Traversierung des Strukturbaums
type TPdfStructureReadStatus = record
Completed: Boolean;
ElementsVisited: Integer;
AttributeValuesVisited: Integer;
DepthLimitReached: Boolean;
ElementLimitReached: Boolean;
AttributeLimitReached: Boolean;
DeadlineReached: Boolean;
VisitorStopped: Boolean;
end;
Details zu Abschluss und Abbruch, die von den Methoden zur Struktur-Traversierung zurückgegeben werden
type TPdfVersion = (pvUnknown, pv10, pv11, pv12, pv13, pv14, pv15, pv16, pv17);
Die Version einer PDF-Datei oder eines expliziten SaveAs-Ziels. Mögliche Werte sind: unbekannte Version, PDF-Version 1.0 bis 1.7. Explizite SaveAs-Ziele von PDF 1.3 bis PDF 1.7 werden normalisiert und gegen die gewählte PDF-Version validiert
type TPrintPaperHandling = (phUndefined, phSimplex, phDuplexFlipShortEdge, phDuplexFlipLongEdge);
Optionen für das Papierhandling beim Drucken
type TPdfPrintMode = (prEmf, prTextOnly, prPostScript2, prPostScript3, prPostScript2PassThrough, prPostScript3PassThrough, prEmfImageMasks, prPostScript3Type42, prPostScript3Type42PassThrough);
Windows-PDFium-Druckausgabemodus, gewählt über SetPdfPrintMode
type TRenderOption = (reAnnotations, reLcd, reNoNativeText, reGrayscale, reDebugInfo, reNoCatchException, reLimitCache, reHalftone, rePrinting, reReverseByteOrder, reNoSmoothText, reNoSmoothImage, reNoSmoothPath, reInvert, reNightDuotone);
type TRenderOptions = set of TRenderOption;
Flags für das Seitenrendering
type TRotation = (ro0, ro90, ro180, ro270);
Die Seitenrotation des PDF. Die Seite wird im Uhrzeigersinn gedreht
type TSaveOption = (saNone, saIncremental, saNoIncremental, saRemoveSecurity);
Legt fest, wie das PDF-Dokument gespeichert wird
type TSearchOption = (seCaseSensitive, seWholeWord, seConsecutive);
type TSearchOptions = set of TSearchOption;
Such-Flags
type TWebLink = record
Url: WString;
Rectangles: TPdfRectangles;
end;
type TWebLinks = array of TWebLink;
URL-Informationen und Grenzen des Web-Links
type WString = {$ifdef D2009PLUS} string {$else} WideString {$endif D2009PLUS};
Wide String
const PointsPerInch: Integer = 72;
PDF verwendet Points mit einer Dichte von 72 Points pro Zoll
const FLAT_NORMALDISPLAY = 0;
const FLAT_PRINT = 1;
Flattening-Profile für FlattenPage / FlattenAllPages. FLAT_NORMALDISPLAY zielt auf die Bildschirmanzeige; FLAT_PRINT auf die Druckausgabe
const FLATTEN_FAIL = 0;
const FLATTEN_SUCCESS = 1;
const FLATTEN_NOTHINGTODO = 2;
Ergebniscodes, die FlattenPage zurückgibt
type TPdfReadingUnit = record
Text: WString;
Kind: TPdfContentFragmentKind;
HeadingLevel: Integer;
Page: Integer;
Rects: TPdfRectangles;
FragmentIndex: Integer;
SentenceIndex: Integer;
IsAlternateText: Boolean;
Language: WString;
end
type TPdfReadingUnits = array of TPdfReadingUnit;
Satzweise Leseeinheiten für Text-to-Speech- und unterstützende Vorlese-Workflows
type TPdfWordBox = record
Text: WString;
StartIndex: Integer;
Count: Integer;
Rect: TPdfRectangle;
Page: Integer;
end
type TPdfWordBoxes = array of TPdfWordBox;
Wortweise Textbereiche und Seitenrechtecke für synchronisierte Lesehervorhebungen
type TPdfSpokenSpan = record
SpokenStart: Integer;
SpokenCount: Integer;
Page: Integer;
StartIndex: Integer;
Count: Integer;
end
type TPdfSpokenSpans = array of TPdfSpokenSpan;
Abgebildete Bereiche, die Offsets der Sprach-Engine zurück auf den PDF-Seitentext übersetzen
type TPdfSpokenText = record
Text: WString;
Spans: TPdfSpokenSpans;
end
type TPdfSpokenTexts = array of TPdfSpokenText;
Sprachblöcke und Quellzuordnungen für Vorlese-Workflows und TPdfReadingSession
type TPdfReadingSessionState = (pssIdle, pssSpeaking, pssPaused);
Wiedergabestatus, der von TPdfReadingSession gemeldet wird
var LibraryName: string = 'pdfium.dll';
Name der Standard-PDFium-Bibliothek, die verwendet wird, wenn EnableV8Engine False ist. Kann vor dem Aufruf von LoadLibrary geändert werden
var EnableV8Engine: Boolean = False;
Vor dem Laden auf True setzen, um pdfium.v8.dll aus dem passenden Win32- oder Win64-Ordner DLLs zu wählen