Pdf.FileName := 'document.pdf';
Pdf.Password := 'password';
Pdf.Active := True; // open PDF document
Pdf.PageNumber := 1; // select page
ShowMessage(Pdf.Text); // extract text
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;
بيانات العلامة المرجعية
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;
بيانات الوجهة المسماة
type TPdfDestinationViewMode = (dvmUnknown, dvmXYZ, dvmFit, dvmFitHorizontal, dvmFitVertical, dvmFitRectangle, dvmFitBoundingBox, dvmFitBoundingBoxHorizontal, dvmFitBoundingBoxVertical);
type TPdfDestinationViewParameters = array [0..3] of Single;
وضع عرض الوجهة ومعاملاته الأصلية المرتبة
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;
بيانات تعليق الرابط
type TPdfPermission = (permPrint, permModify, permCopy, permAnnotate, permFillForms, permAccessibility, permAssemble, permPrintHighQuality);
type TPdfPermissions = set of TPdfPermission;
علامات صلاحيات المستند المُنمَّطة المفكوكة من قناع الصلاحيات الأصلي
type TPdfDocumentMetadata = record
Title: WString;
Author: WString;
Subject: WString;
Keywords: WString;
Creator: WString;
Producer: WString;
CreationDate: WString;
ModifiedDate: WString;
end;
لقطة واحدة لحقول قاموس Info القياسي للمستند
type TObjectType = (otUnknown, otText, otPath, otImage, otShading, otForm);
تحدد نوع كائن PDF
type TPageMode = (pmNone, pmOutline, pmThumbs, pmFullScreen, pmOptionalContentGroup, pmAttachments, pmUnknown);
تحدد كيفية عرض مستند PDF عند فتحه
type TPdfAction = (acUnsupported, acGoto, acGotoRemote, acUri, acLaunch);
تحدد نوع الإجراء المرتبط بعنصر علامة مرجعية
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;
بيانات التعليق
type TPdfAnnotationFlag = (afInvisible, afHidden, afPrint, afNoZoom, afNoRotate, afNoView, afReadOnly, afLocked, afToggleNoView);
type TPdfAnnotationFlags = set of TPdfAnnotationFlag;
علامات التعليق
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);
النوع الفرعي للتعليق
type TPdfBlendMode = (bmDefault, bmColor, bmColorBurn, bmColorDodge, bmDarken, bmDifference, bmExclusion, bmHardLight, bmHue, bmLighten, bmLuminosity, bmMultiply, bmNormal, bmOverlay, bmSaturation, bmScreen, bmSoftLight);
تحدد كيفية دمج الطبقات بعضها في بعض
type TPdfDisplayMode = (dmSingleContinuous, dmTwoPageContinuous, dmTwoPageContinuousWithCover);
تحدد كيفية عرض صفحات مستند PDF
type TPdfFeature = (feUnknown, feXfaForm, fePortableCollection, feAttachment, feSecurity, feSharedReview, feSharedFormAcrobat, feSharedFormFilesystem, feSharedFormEmail, fe3dAnnotation, feMovieAnnotation, feSoundAnnotation, feScreenMediaAnnotation, feScreenRichMediaAnnotation, feAttachmentAnnotation, feSignatureAnnotation);
ميزة مستند PDF التي يُبلِّغ عنها حدث OnUnsupportedFeature
type TPdfFillMode = (fmNone, fmAlternate, fmWinding);
تحدد كيفية تشكل مناطق التعبئة عندما يتقاطع المسار مع نفسه
type TPdfFormFieldFlag = (ffReadOnly, ffRequired, ffNoExport, ffMultiline, ffChoiceCombo, ffChoiceEdit, ffPassword, ffChoiceMultiSelect);
type TPdfFormFieldFlags = set of TPdfFormFieldFlag;
علامات حقول النموذج
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;
معلومات حقل النموذج
type TPdfFormFieldType = (fiUnknown, fiPushButton, fiCheckBox, fiRadioButton, fiComboBox, fiListBox, fiTextField, fiSignature);
تحدد نوع حقل النموذج
type TPdfFormType = (ftUnknown, ftNone, ftAcroForm, ftXfaFull, ftXfaForeground);
تحدد نوع النماذج في مستند PDF
type TPdfImage = record
Width: Integer;
Height: Integer;
Data: TBytes;
end;
الحجم بالبكسل وبيانات كائن صورة PDF
type TPdfLineCap = (lcDefault, lcButt, lcRound, lcProjectingSquare);
الشكل المستخدم عند نهايات المسارات الفرعية المفتوحة
type TPdfLineJoin = (ljDefault, ljMiter, ljRound, ljBevel);
الشكل المستخدم عند زوايا المسارات المحددة
type TPdfPoint = record
X, Y: Double;
end;
نقطة بإحداثيين X و Y
type TPdfRectangle = record
Left, Top, Right, Bottom: Double;
end;
type TPdfRectangles = array of TPdfRectangle;
منطقة مستطيلة بإحداثيات Left و Top و Right و Bottom
type TPdfFileIdentifierType = (fidPermanent, fidChanging);
محدد معرف ملف مقطع الذيل. يقرأ fidPermanent مدخل /ID الأول ويقرأ fidChanging مدخل /ID الثاني
type TPdfPageBox = (pbMedia, pbCrop, pbBleed, pbTrim, pbArt);
محدد صندوق قاموس الصفحة الذي تستخدمه PageBox و GetPageBox و SetPageBox
type TPdfJavaScriptAction = record
Name: WString;
Script: WString;
end;
type TPdfJavaScriptActions = array of TPdfJavaScriptAction;
بيانات إجراء شجرة أسماء JavaScript على مستوى المستند
type TPdfSignature = record
Content: TBytes;
Encoding: WString;
Reason: WString;
Time: WString;
Permission: Integer;
end;
معلومات التوقيع الرقمي
type TPdfIntegerArray = array of Integer;
مصفوفة أعداد صحيحة تستخدمها قوائم معرفات المحتوى المُعلَّم في شجرة البنية
type TPdfSingleArray = array of Single;
مصفوفة فاصلة عائمة أحادية الدقة تستخدمها معيِّنات مواضع أحرف كائن النص
type TPdfPrintPageRange = record
StartPage: Integer;
EndPage: Integer;
end;
type TPdfPrintPageRanges = array of TPdfPrintPageRange;
نطاقات صفحات الطباعة ذات الأساس 1 من تفضيلات عارض المستند
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;
بيانات عنصر البنية المنطقية المبسطة لصفحات PDF الموسومة
type TPdfFormSelectionRect = record
PageNumber: Integer;
Bounds: TPdfRectangle;
end;
مستطيل واحد في فضاء الصفحة يملكه المستدعي يُبلِّغ عنه تحديد نص النموذج الأصلي
type TPdfStructureReadOptions = record
MaxDepth: Integer;
MaxElements: Integer;
MaxAttributeValues: Integer;
DeadlineMilliseconds: Cardinal;
IncludeAttributes: Boolean;
class function Default: TPdfStructureReadOptions; static;
end;
ميزانيات موارد لاجتياز تكراري لشجرة البنية الأصلية
type TPdfStructureReadStatus = record
Completed: Boolean;
ElementsVisited: Integer;
AttributeValuesVisited: Integer;
DepthLimitReached: Boolean;
ElementLimitReached: Boolean;
AttributeLimitReached: Boolean;
DeadlineReached: Boolean;
VisitorStopped: Boolean;
end;
تفاصيل الإكمال والاقتطاع التي تعيدها طرق اجتياز البنية
type TPdfVersion = (pvUnknown, pv10, pv11, pv12, pv13, pv14, pv15, pv16, pv17);
إصدار ملف PDF أو هدف SaveAs صريح. القيم الممكنة هي: إصدار غير معروف، وإصدار PDF من 1.0 إلى 1.7. تُطبَّع أهداف SaveAs الصريحة من PDF 1.3 حتى PDF 1.7 ويُتحقق منها مقابل إصدار PDF المختار
type TPrintPaperHandling = (phUndefined, phSimplex, phDuplexFlipShortEdge, phDuplexFlipLongEdge);
خيارات معالجة ورق الطباعة
type TPdfPrintMode = (prEmf, prTextOnly, prPostScript2, prPostScript3, prPostScript2PassThrough, prPostScript3PassThrough, prEmfImageMasks, prPostScript3Type42, prPostScript3Type42PassThrough);
وضع إخراج الطباعة في Windows PDFium الذي يختاره SetPdfPrintMode
type TRenderOption = (reAnnotations, reLcd, reNoNativeText, reGrayscale, reDebugInfo, reNoCatchException, reLimitCache, reHalftone, rePrinting, reReverseByteOrder, reNoSmoothText, reNoSmoothImage, reNoSmoothPath, reInvert, reNightDuotone);
type TRenderOptions = set of TRenderOption;
علامات تصيير الصفحة
type TRotation = (ro0, ro90, ro180, ro270);
دوران صفحة PDF. يدور دوران الصفحة مع عقارب الساعة
type TSaveOption = (saNone, saIncremental, saNoIncremental, saRemoveSecurity);
تحدد كيفية حفظ مستند PDF
type TSearchOption = (seCaseSensitive, seWholeWord, seConsecutive);
type TSearchOptions = set of TSearchOption;
علامات البحث
type TWebLink = record
Url: WString;
Rectangles: TPdfRectangles;
end;
type TWebLinks = array of TWebLink;
معلومات الرابط وحدوده لرابط الويب
type WString = {$ifdef D2009PLUS} string {$else} WideString {$endif D2009PLUS};
سلسلة عريضة
const PointsPerInch: Integer = 72;
يستخدم PDF النقاط بكثافة 72 نقطة لكل بوصة
const FLAT_NORMALDISPLAY = 0;
const FLAT_PRINT = 1;
ملفات تسطيح تُمرَّر إلى FlattenPage / FlattenAllPages. يستهدف FLAT_NORMALDISPLAY عرض الشاشة؛ ويستهدف FLAT_PRINT الإخراج المطبوع
const FLATTEN_FAIL = 0;
const FLATTEN_SUCCESS = 1;
const FLATTEN_NOTHINGTODO = 2;
رموز النتائج التي يعيدها FlattenPage
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;
وحدات قراءة على مستوى الجمل تستخدمها سير عمل تحويل النص إلى كلام والاستماع المساعد للقراءة
type TPdfWordBox = record
Text: WString;
StartIndex: Integer;
Count: Integer;
Rect: TPdfRectangle;
Page: Integer;
end
type TPdfWordBoxes = array of TPdfWordBox;
نطاقات نص على مستوى الكلمات ومستطيلات صفحات تستخدمها تمييزات القراءة المتزامنة
type TPdfSpokenSpan = record
SpokenStart: Integer;
SpokenCount: Integer;
Page: Integer;
StartIndex: Integer;
Count: Integer;
end
type TPdfSpokenSpans = array of TPdfSpokenSpan;
مقاطع معيَّنة تترجم إزاحات محرك النطق مرة أخرى إلى نص صفحة PDF
type TPdfSpokenText = record
Text: WString;
Spans: TPdfSpokenSpans;
end
type TPdfSpokenTexts = array of TPdfSpokenText;
أجزاء النطق وتعيينات المصدر التي تستخدمها سير عمل القراءة الجهرية و TPdfReadingSession
type TPdfReadingSessionState = (pssIdle, pssSpeaking, pssPaused);
حالة التشغيل التي يُبلِّغها TPdfReadingSession
var LibraryName: string = 'pdfium.dll';
اسم مكتبة PDFium القياسية المستخدمة عندما يكون EnableV8Engine هو False. يمكن تغييره قبل استدعاء LoadLibrary
var EnableV8Engine: Boolean = False;
عيِّن إلى True قبل التحميل لاختيار pdfium.v8.dll من مجلد DLLs المطابق Win32 أو Win64