diff --git a/lib/src/main/java/dev/foliopdf/Cell.java b/lib/src/main/java/dev/foliopdf/Cell.java index 4e6474c..4e6ae0b 100644 --- a/lib/src/main/java/dev/foliopdf/Cell.java +++ b/lib/src/main/java/dev/foliopdf/Cell.java @@ -108,12 +108,6 @@ public Cell border(double width, Color color) { return this; } - /** - * Provides a hint for the preferred width of this cell in points. - * - * @param pts the preferred width in points - * @return this cell, for chaining - */ /** * Sets individual borders on each side of this cell with independent width and color. * @@ -133,6 +127,12 @@ public Cell borders(double topW, Color top, double rightW, Color right, return this; } + /** + * Provides a hint for the preferred width of this cell in points. + * + * @param pts the preferred width in points + * @return this cell, for chaining + */ public Cell widthHint(double pts) { FolioNative.cellSetWidthHint(handle, pts); return this; diff --git a/lib/src/main/java/dev/foliopdf/Heading.java b/lib/src/main/java/dev/foliopdf/Heading.java index c0757fd..ccf6842 100644 --- a/lib/src/main/java/dev/foliopdf/Heading.java +++ b/lib/src/main/java/dev/foliopdf/Heading.java @@ -64,12 +64,6 @@ public static Heading ofEmbedded(String text, HeadingLevel level, Font font) { return new Heading(h); } - /** - * Sets the text alignment for this heading. - * - * @param align the desired {@link Align} value - * @return this heading, for chaining - */ /** * Replaces the heading text with styled runs from a {@link RunList}. * @@ -81,6 +75,12 @@ public Heading setRuns(RunList runs) { return this; } + /** + * Sets the text alignment for this heading. + * + * @param align the desired {@link Align} value + * @return this heading, for chaining + */ public Heading align(Align align) { FolioNative.headingSetAlign(handle.get(), align.value()); return this; diff --git a/lib/src/main/java/dev/foliopdf/ListElement.java b/lib/src/main/java/dev/foliopdf/ListElement.java index da63b0e..d8a2844 100644 --- a/lib/src/main/java/dev/foliopdf/ListElement.java +++ b/lib/src/main/java/dev/foliopdf/ListElement.java @@ -93,12 +93,6 @@ public ListElement leading(double leading) { return this; } - /** - * Appends a text item to this list. - * - * @param text the item text - * @return this list, for chaining - */ /** * Adds a list item with styled text runs from a {@link RunList}. * @@ -122,6 +116,12 @@ public ListElement itemRunsWithSublist(RunList runs) { return new ListElement(h); } + /** + * Appends a text item to this list. + * + * @param text the item text + * @return this list, for chaining + */ public ListElement item(String text) { FolioNative.listAddItem(handle.get(), text); return this; diff --git a/lib/src/main/java/dev/foliopdf/Paragraph.java b/lib/src/main/java/dev/foliopdf/Paragraph.java index efe1bdc..6b3413a 100644 --- a/lib/src/main/java/dev/foliopdf/Paragraph.java +++ b/lib/src/main/java/dev/foliopdf/Paragraph.java @@ -48,15 +48,6 @@ public static Paragraph of(String text, Font font, double fontSize) { return new Paragraph(h); } - /** - * Creates a paragraph that embeds the font subset in the PDF output. - * - * @param text the paragraph text - * @param font the font to embed - * @param fontSize the font size in points - * @return a new {@link Paragraph} with an embedded font - * @throws FolioException if the native call fails - */ /** * Creates a paragraph with the given text and font size using the default Helvetica font. * @@ -68,6 +59,15 @@ public static Paragraph of(String text, double fontSize) { return of(text, Font.helvetica(), fontSize); } + /** + * Creates a paragraph that embeds the font subset in the PDF output. + * + * @param text the paragraph text + * @param font the font to embed + * @param fontSize the font size in points + * @return a new {@link Paragraph} with an embedded font + * @throws FolioException if the native call fails + */ public static Paragraph ofEmbedded(String text, Font font, double fontSize) { long h = FolioNative.paragraphNewEmbedded(text, font.handle(), fontSize); if (h == 0) throw new FolioException("Failed to create embedded paragraph: " + FolioNative.lastError()); diff --git a/lib/src/main/java/dev/foliopdf/PdfMerger.java b/lib/src/main/java/dev/foliopdf/PdfMerger.java index f5c5c73..e96162a 100644 --- a/lib/src/main/java/dev/foliopdf/PdfMerger.java +++ b/lib/src/main/java/dev/foliopdf/PdfMerger.java @@ -143,12 +143,6 @@ public void save(String path) { FolioNative.mergeSave(handle.get(), path); } - /** - * Renders the merged document to an in-memory byte array. - * - * @return the PDF bytes - * @throws FolioException if the write fails - */ /** Returns the number of pages in the merged document. */ public int pageCount() { return FolioNative.mergePageCount(handle.get()); @@ -190,6 +184,12 @@ public PdfMerger cropPage(int index, double x1, double y1, double x2, double y2) return this; } + /** + * Renders the merged document to an in-memory byte array. + * + * @return the PDF bytes + * @throws FolioException if the write fails + */ public byte[] writeToBuffer() { long buf = FolioNative.mergeWriteToBuffer(handle.get()); if (buf == 0) throw new FolioException("Failed to write merged PDF to buffer: " + FolioNative.lastError());