GlenKPeterson / PdfLayoutManager

Adds line-breaking, page-breaking, tables, and styles to PDFBox
45 stars 20 forks source link

updates to use PDType0Font in the doc #25

Open maidenur opened 1 year ago

maidenur commented 1 year ago

Users will be able to insert desired fonts using the PDDocument which will be injected to PdfLayoutMgr.

        PDDocument document = new PDDocument();
        PDFont font = PDType0Font.load(document, new File("AbhayaLibre-Medium.ttf"));
        PDFont boldFont = PDType0Font.load(document, new File("AbhayaLibre-Bold.ttf"));
        PdfLayoutMgr pageMgr = PdfLayoutMgr.newRgbPageMgr(document);

TextStyle as;

TextStyle regular = TextStyle.of(font, 9.5, Color.BLACK);