Package com.teamten.typeset
Class Typesetter
java.lang.Object
com.teamten.typeset.Typesetter
Converts a document to a PDF.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPagesToPdf
(List<Page> pages, Config config, Sections sections, FontManager fontManager, org.apache.pdfbox.pdmodel.PDDocument pdDoc) Send each page (with the given size) to the PDF.void
addPageToPdf
(Page page, Config config, Sections sections, FontManager fontManager, org.apache.pdfbox.pdmodel.PDDocument pdDoc) Add the VBox as a page to the PDF.void
addVerticalListToPdf
(VerticalList verticalList, Config config, Sections sections, FontManager fontManager, org.apache.pdfbox.pdmodel.PDDocument pdDoc) Adds the entire vertical list to the PDF, by first breaking it into pages and then adding the pages to the PDF.void
drawHeadline
(Page page, Config config, Sections sections, FontManager fontManager, org.apache.pdfbox.pdmodel.PDPageContentStream contents) Draw the headline (page number of part or chapter title) at the top of the page.static void
static @NotNull HorizontalList
makeHorizontalListFromBlock
(Block block, ParagraphStyle paragraphStyle, org.apache.pdfbox.pdmodel.PDDocument pdDoc, Config config, FontManager fontManager, Bookmarks bookmarks, Sections sections, HyphenDictionary hyphenDictionary, int footnoteNumber) org.apache.pdfbox.pdmodel.PDDocument
verticalListToPages
(VerticalList verticalList, long textHeight) Format the vertical list into a sequence of pages.
-
Field Details
-
mWarningCount
public static int mWarningCount
-
-
Constructor Details
-
Typesetter
public Typesetter()
-
-
Method Details
-
main
- Throws:
IOException
-
typeset
- Throws:
IOException
-
makeHorizontalListFromBlock
@NotNull public static @NotNull HorizontalList makeHorizontalListFromBlock(Block block, ParagraphStyle paragraphStyle, org.apache.pdfbox.pdmodel.PDDocument pdDoc, Config config, FontManager fontManager, Bookmarks bookmarks, Sections sections, HyphenDictionary hyphenDictionary, int footnoteNumber) throws IOException - Throws:
IOException
-
addVerticalListToPdf
public void addVerticalListToPdf(VerticalList verticalList, Config config, Sections sections, FontManager fontManager, org.apache.pdfbox.pdmodel.PDDocument pdDoc) throws IOException Adds the entire vertical list to the PDF, by first breaking it into pages and then adding the pages to the PDF.- Throws:
IOException
-
verticalListToPages
Format the vertical list into a sequence of pages.- Parameters:
textHeight
- the max height of the text on a page.
-
addPagesToPdf
public void addPagesToPdf(List<Page> pages, Config config, Sections sections, FontManager fontManager, org.apache.pdfbox.pdmodel.PDDocument pdDoc) throws IOException Send each page (with the given size) to the PDF.- Throws:
IOException
-
addPageToPdf
public void addPageToPdf(Page page, Config config, Sections sections, FontManager fontManager, org.apache.pdfbox.pdmodel.PDDocument pdDoc) throws IOException Add the VBox as a page to the PDF.- Throws:
IOException
-
drawHeadline
public void drawHeadline(Page page, Config config, Sections sections, FontManager fontManager, org.apache.pdfbox.pdmodel.PDPageContentStream contents) throws IOException Draw the headline (page number of part or chapter title) at the top of the page.- Throws:
IOException
-