Record Class FixedDocument
java.lang.Object
java.lang.Record
io.leandev.appfuse.pdf.FixedDocument
@ExperimentalApi
public record FixedDocument(String title, List<FixedDocument.Page> pages, List<FixedDocument.LayoutIssue> layoutIssues)
extends Record
固定版面文件;幾何為 mm(左上原點,x 向右、y 向下),文字、字距、線寬與虛線長度為 pt。
頁面、明細容量及續頁由模板明確建立,不自動流動或分頁;元素依清單順序繪製。
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic final record黑白向量條碼。moduleMm 不縮放;一維碼 heightMm 為條高,QR 高度由模組數決定。 quietModules 為每側靜區,QR 至少 4、一維碼至少 10。payload 的業務檢查碼由應用提供。 不自動加入人眼可讀文字,需另建 Text。static enumstatic interfacestatic final record橢圓外接框,可用於蓋章區;填色可省略。static final record固定文字框/圖像框;座標為外框左上角。static final recordPNG/JPEG 於框中等比置中,不拉伸;位元組防禦複製。static enumSTATIC 為框線/底圖等預印內容;VARIABLE 為每份資料。套印只輸出 VARIABLE。static final record建立者判定的幾何問題,例如區塊重疊;不可用此接點表示權限、資料或版本錯誤。 自訂 code 應使用應用自己的穩定命名空間。嚴格政策拒絕,警示政策完整繪製。static final record任意方向線段,可用於撕線、點線或虛線分隔。 dashPatternPt 為交替的線段與空白長度(pt,與線寬同單位);空清單為實線,奇數個元素由 PDF 重複兩次形成週期。 dashPhasePt 為週期起點偏移,實線必須為 0。整條線以單一路徑繪製,不需拆段。static final record固定頁;同頁 ID 不得重複。嚴格政策要求框線筆畫也位於紙張內。static final recordPDF 頁面外觀底稿,固定為 STATIC 層。頁碼從 1 起,不匯入註解、AcroForm 或動作。 來源頁面須無旋轉、CropBox 原點為 0、UserUnit 為 1,尺寸與目標頁相同;不自動縮放。static final recordfillRgb 為 null 表示不填色;線寬必須大於 0。static final recordCRLF/CR 正規化為 LF,Tab 展開成四個空格(非 tab stop);其他控制字元拒絕。 lineHeightPt 為基線間距;使用整個文字框所用字型的最大 ascent/descent 檢查上下界,不以裁切掩蓋超框。 letterSpacingPt 為同一行相鄰 code point 之間額外加的距離(非負,預設 0);行尾不加, 對齊、換行與超框檢查都以含字距的寬度計算。不做字距微調(kerning)。static enum超框依 LayoutPolicy 回報警示或拒絕;不靜默縮字或截斷。 -
Constructor Summary
ConstructorsConstructorDescriptionFixedDocument(String title, List<FixedDocument.Page> pages) FixedDocument(String title, List<FixedDocument.Page> pages, List<FixedDocument.LayoutIssue> layoutIssues) Creates an instance of aFixedDocumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelayoutIssuesrecord component.pages()Returns the value of thepagesrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FixedDocument
public FixedDocument(String title, List<FixedDocument.Page> pages, List<FixedDocument.LayoutIssue> layoutIssues) Creates an instance of aFixedDocumentrecord class.- Parameters:
title- the value for thetitlerecord componentpages- the value for thepagesrecord componentlayoutIssues- the value for thelayoutIssuesrecord component
-
FixedDocument
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
pages
Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
layoutIssues
Returns the value of thelayoutIssuesrecord component.- Returns:
- the value of the
layoutIssuesrecord component
-