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);
OnUnsupportedFeature 이벤트로 보고되는 PDF 문서의 기능
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);
Trailer 파일 식별자 선택자. 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;
구조 트리 marked-content ID 목록에 사용되는 정수 배열
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;
Tagged 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까지의 버전입니다. PDF 1.3부터 PDF 1.7까지의 명시적 SaveAs 대상은 정규화되어 선택된 PDF 버전에 대해 검증됩니다
type TPrintPaperHandling = (phUndefined, phSimplex, phDuplexFlipShortEdge, phDuplexFlipLongEdge);
인쇄 용지 처리 옵션
type TPdfPrintMode = (prEmf, prTextOnly, prPostScript2, prPostScript3, prPostScript2PassThrough, prPostScript3PassThrough, prEmfImageMasks, prPostScript3Type42, prPostScript3Type42PassThrough);
SetPdfPrintMode로 선택하는 Windows PDFium 인쇄 출력 모드
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;
웹 링크의 URL 정보와 경계
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;
TTS 및 보조 듣기 읽기 워크플로에서 사용되는 문장 단위 읽기 단위
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;
read-aloud 워크플로와 TPdfReadingSession에서 사용되는 음성 청크 및 소스 매핑
type TPdfReadingSessionState = (pssIdle, pssSpeaking, pssPaused);
TPdfReadingSession이 보고하는 재생 상태
var LibraryName: string = 'pdfium.dll';
EnableV8Engine이 False일 때 사용되는 표준 PDFium 라이브러리의 이름. LoadLibrary를 호출하기 전에 변경할 수 있습니다
var EnableV8Engine: Boolean = False;
로딩 전에 True로 설정하면 일치하는 Win32 또는 Win64 DLLs 폴더에서 pdfium.v8.dll을 선택합니다