| Type | Values or purpose |
|---|---|
EPdfLayoutError | exception ที่เกิดจากอินพุตการจัดวางไม่ถูกต้อง เกินขีดจำกัด และโครงสร้างเชิงความหมายไม่สอดคล้องกัน |
TPdfLayoutAlignment | plaLeft, plaCenter, plaRight |
TPdfLayoutCommandKind | plcText, plcRule, plcImage, plcPageXObject, plcCachedNode, plcLink, plcRectangle |
TPdfLayoutItemKind | pliText, pliSpacer, pliRule, pliImage, pliPageXObject, pliPageBreak, pliCachedNode, pliLink, pliSemanticNode, pliTable |
TPdfLayoutSemanticRole | plsrArtifact, plsrParagraph, plsrHeading1, plsrHeading2, plsrHeading3, plsrHeading4, plsrHeading5, plsrHeading6, plsrList, plsrListItem, plsrListLabel, plsrListBody, plsrTable, plsrTableRow, plsrTableHeader, plsrTableData, plsrFigure, plsrCaption, plsrLink, plsrSection, plsrDivision |
TPdfLayoutTableScope | pltsNone, pltsRow, pltsColumn, pltsBoth |
TPdfLayoutListNumbering | plnNone, plnDisc, plnCircle, plnSquare, plnDecimal, plnUpperRoman, plnLowerRoman, plnUpperAlpha, plnLowerAlpha |
TPdfLayoutGridTrackKind | plgtkFixed, plgtkFraction, plgtkAuto |
TPdfMarkupFormat | pmfMarkdown, pmfHtml |
| Type | Public members |
|---|---|
TPdfLayoutSemantics | Role, ParentID, ElementID, AlternateText, ActualText, Language, HeaderIDs, TableScope, ColumnSpan, RowSpan, ListNumbering, Artifact, Paragraph, Figure |
TPdfLayoutTextStyle | FontName, FontSize, Color, Alpha, LineHeight, Alignment, KeepTogether, BreakLongWords, SpaceBefore, SpaceAfter, Default |
TPdfLayoutConstraints | KeepTogether, KeepWithNext, PageBreakBefore, PageBreakAfter, OrphanLines, WidowLines, Default |
TPdfLayoutPageSettings | Width, Height, MarginLeft, MarginTop, MarginRight, MarginBottom, HeaderHeight, FooterHeight, A4, Letter |
TPdfLayoutRect | Left, Top, Width, Height |
TPdfLayoutGridTrack | Kind, Value, Minimum, Maximum, MeasuredContent |
TPdfLayoutGridTracks | อาร์เรย์แบบ dynamic ของ TPdfLayoutGridTrack |
TPdfLayoutGridSizes | อาร์เรย์แบบ dynamic ของขนาด track ที่ resolve แล้ว |
TPdfLayoutTableOptions | CellPadding, BorderWidth, BorderColor, BorderAlpha, RepeatHeaderRows, Default |
TPdfMarkupOptions | BaseStyle, HeadingScale, MaxInputCharacters, MaxNodes, Default |
TPdfLayoutSemanticElement | Semantics, ParentElementIndex |
TPdfLayoutSemanticElements | อาร์เรย์แบบ dynamic ของ TPdfLayoutSemanticElement |
TPdfLayoutCommand | Kind, PageNumber, Bounds, Text, FontName, FontSize, Color, Alpha, Alignment, Thickness, FileName, Uri, Source, SourcePageIndex, SemanticElementIndex, MarkedContentID, AnnotationIndex |
TPdfLayoutCommands | อาร์เรย์แบบ dynamic ของ TPdfLayoutCommand |
TPdfLayoutPlan | PageSettings, PageCount, Commands, SemanticElements, TextLineCount, RuleCount, RectangleCount, ImageCount, PageXObjectCount, CachedNodeCount, LinkCount, TaggedContentCount, ArtifactCount, MeasuredTextCount, TotalPageReferenceCount, ReservedPageDigits, CacheHitCount, CacheMissCount, ReusedXObjectCount, ColumnCount, ColumnGap |
| Type | Public members |
|---|---|
TPdfLayoutMeasurer | MeasureTextWidth, CacheIdentity |
TPdfLayoutItem | Kind |
TPdfLayoutTableCell | Text, Uri, Style, ColumnSpan, RowSpan, Header, ElementID, HeaderIDs, Scope |
TPdfLayoutTableRow | AddCell, Cells, Header, AllowSplit, MinimumHeight |
TPdfLayoutTable | Create, Destroy, AddRow, SetCaption, Columns, Rows, Options, Caption, CaptionStyle, ElementID, ParentID |
TPdfLayoutPagedPlan | Create, Destroy, ClearPageCache, MaterializePage, Reset, Summary, CommandCount, StorageByteCount, SourceCount, Completed, งบประมาณ MaxCommandCount, MaxStorageBytes, MaxPageCommands, MaxSourceCount และ MaxCachedPages และสถิติ cache CachedPageCount, CacheHitCount, CacheMissCount และ PeakCachedPageCount |
TPdfLayoutDocument | Create, Destroy, Clear, AddText, AddSpacer, AddRule, AddImage, AddPageXObject, AddCachedNode, AddLink, AddSemanticNode, SetLastItemSemantics, SetLastItemConstraints, AddTable, AddPageBreak, LoadMarkup, InvalidateCache, BuildPlan, BuildPagedPlan, PageSettings, HeaderText, FooterText, HeaderStyle, FooterStyle, ReservedPageDigits, ColumnCount, ColumnGap, Items |
TPdfLayoutCachedNode | Create, Destroy, Invalidate, BeginEmission, EndEmission, Content, Width, Height, Built |
เรียก SetLastItemConstraints หลังเพิ่ม flow item ที่มองเห็นได้ทุกชิ้น เพื่อให้ item อยู่รวมกันเป็นก้อน ต่อยึดกับต้นของ item ถัดไป หรือบังคับขึ้นหน้าใหม่จริงก่อนหรือหลัง item นั้น
OrphanLines คือจำนวนบรรทัดย่อหน้าขั้นต่ำที่คงไว้ท้ายพื้นที่หนึ่ง ส่วน WidowLines คือจำนวนขั้นต่ำที่ยกไปวางต้นพื้นที่ถัดไป; ทั้งสองค่า default เป็นหนึ่ง เพื่อคงพฤติกรรมการแบ่งหน้าเดิม
เงื่อนไขเหล่านี้ใช้กับ item ที่เป็นย่อหน้า ลิงก์ รายการ รูปภาพ และตารางอย่างเท่าเทียม ส่วน container ที่มีเฉพาะความหมายไม่มีมิติทางเรขาคณิต จึงปฏิเสธ pagination constraints
item แบบ pliTable ยอมรับเฉพาะ PageBreakBefore กับ PageBreakAfter; การแบ่งแถวและการยึดจุดเริ่มตารางถูกควบคุมโดยโมเดลตาราง
ตัววางแผน cache บรรทัดที่ตัดคำไว้ระหว่างการ build ดังนั้นการทำนาย keep-with-next กับการปล่อย command สุดท้ายจึงไม่ต้องวัดข้อความเดียวกันสองครั้ง
สร้าง TPdfLayoutPagedPlan เหนือ TStream เฉพาะที่ seekable และปรับขนาดได้ แล้วเรียก BuildPagedPlan หรือส่งมันต่อให้ TPdf.GeneratePagedLayout
ตัววางแผน serialize command ทันที คืนพื้นที่ของผลลัพธ์ wrapped-text ที่เสร็จแล้วแต่ละชิ้น และปล่อยให้ Plan.Commands ว่างเปล่า โดยยังเก็บการตั้งค่าหน้า semantic elements ตัวนับ และผลรวมหน้าที่เสถียรไว้ใน summary
command ของเนื้อหาและ command header หรือ footer ที่เกิดทีหลังจะถูกจัดดัชนีเป็น page segment แบบโยงกัน ทำให้ MaterializePage คืนหน้าฉบับสมบูรณ์ได้โดยไม่ต้องสแกน command ของหน้าอื่น
MaxCachedPages จำกัดเฉพาะอาร์เรย์หน้าที่แผนถือครอง; ผู้เรียกที่เก็บอาร์เรย์ที่คืนไว้จะยืดอายุของมันเอง และ PDFium จะยังถือหน้า native ที่สร้างไว้จนกว่าเอกสารปลายทางจะถูกบันทึกหรือปิด
รูปแบบการเก็บข้อมูลเป็นสถานะเซสชันส่วนตัว ไม่ใช่รูปแบบไฟล์พกพา ห้ามแชร์หรือแก้ไข stream นี้จากภายนอก และอ็อบเจกต์ต้นทางที่ page XObject หรือ cached node อ้างถึงต้องมีอายุยาวกว่า paged plan
ใช้ TPdfRandomAccessStore เมื่อต้องการให้ command อยู่ในหน่วยความจำถึงเกณฑ์ที่เลือกหนึ่งค่า แล้วค่อยไหลไปเก็บเป็นไฟล์ชั่วคราวแบบลบเมื่อปิด
สร้าง TPdfLayoutTable ด้วย grid track แบบค่าคงที่ สัดส่วน หรือตามขนาดเนื้อหา เพิ่มแถวและเซลล์ แล้วเรียก AddTable; เอกสารจะเก็บ snapshot ที่เป็นเจ้าของไว้ ทำให้การแก้ไขภายหลังของผู้เรียกไม่ทำให้ page cache ที่มีอยู่ใช้ไม่ได้
แถว header ต้องติดกันตั้งแต่ต้นตาราง และจะถูกทำซ้ำหลังเปลี่ยนหน้าหรือคอลัมน์เมื่อ RepeatHeaderRows เป็น true; span ของแถว header ห้ามยืดเข้าไปในแถวเนื้อหา
แถวเนื้อหาแบ่งได้เมื่อ AllowSplit เป็น true เท่านั้น และต้องไม่อยู่ในกลุ่ม row-spanning; เซลล์ทุกเซลล์ใน chunk ที่ถูกแบ่งจะใช้แนวบรรทัด padding และเรขาคณิตของเส้นขอบเดียวกัน
caption จะยึดกับบล็อก header ที่ถูกทำซ้ำและจุดเริ่มต้นขั้นต่ำของกลุ่มเนื้อหาแรก ส่วนกลุ่ม row-spanning แบบส่งผลต่อกันจะเคลื่อนเป็นหน่วยเดียวแบบ atomic
ตัววางแผนปล่อย Table element หนึ่งอัน, Caption เมื่อมี, TR ลูก และเซลล์ TH หรือ TD ไม่ว่าจะแบ่งกี่หน้า; command ของ header ที่ถูกทำซ้ำใช้ semantic index เดิม และเซลล์ TD จะได้รับ header ID ที่ทับซ้อนกันโดยอัตโนมัติ เว้นแต่ผู้เรียกให้ ID ที่ถูกต้องมาเอง
เส้นขอบตารางเป็น command plcRectangle แบบ artifact ที่เรนเดอร์ผ่าน path object แบบ native ของ PDFium ส่วนข้อความ caption และเซลล์ยังเป็นเนื้อหาแบบ tagged
| Routine | Description |
|---|---|
ResolveLayoutText | ขยาย placeholder เลขหน้าโดยใช้ความกว้างหลักที่สงวนไว้ |
PdfLayoutSemanticRoleName | คืนชื่อโครงสร้าง tagged-PDF ของบทบาทเชิงความหมายหนึ่งค่า |
BuildTaggedLayoutPdf | นำแผนจัดวางและโครงสร้าง tagged ที่เสร็จแล้วไปใช้กับไบต์ PDF ต้นทาง |
ResolvePdfLayoutGridTracks | resolve grid track แบบค่าคงที่ สัดส่วน และตามขนาดเนื้อหา ภายในความกว้างที่มีอยู่ |