Class PdfUtil


  • public final class PdfUtil
    extends Object
    • Method Detail

      • drawTable

        public static void drawTable​(org.apache.pdfbox.pdmodel.PDPage page,
                                     org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
                                     double y,
                                     double margin,
                                     List<PdfCell> listContent)
                              throws IOException
        Parameters:
        page -
        contentStream -
        y - the y-coordinate of the first row
        margin - the padding on left and right of table
        content - a 2d array containing the table data
        Throws:
        IOException
      • addCenteredText

        public static void addCenteredText​(org.apache.pdfbox.pdmodel.PDPage page,
                                           org.apache.pdfbox.pdmodel.PDPageContentStream stream,
                                           org.apache.pdfbox.pdmodel.font.PDFont font,
                                           int fontSize,
                                           int marginTop,
                                           String text)
                                    throws IOException
        Throws:
        IOException