Class BengaliPdfGenerationHelloWorld


  • public class BengaliPdfGenerationHelloWorld
    extends java.lang.Object
    Inspired from PdfBox Example. This attempts to correctly demonstrate to what extent Bengali text rendering is supported. We read large amount of text from a file and try to render it properly.
    • Constructor Detail

      • BengaliPdfGenerationHelloWorld

        private BengaliPdfGenerationHelloWorld()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • getReAlignedTextBasedOnPageHeight

        private static java.util.List<java.util.List<java.lang.String>> getReAlignedTextBasedOnPageHeight​(java.util.List<java.lang.String> originalLines,
                                                                                                          PDFont font,
                                                                                                          float workablePageHeight)
      • getReAlignedTextBasedOnPageWidth

        private static java.util.List<java.lang.String> getReAlignedTextBasedOnPageWidth​(java.util.List<java.lang.String> originalLines,
                                                                                         PDFont font,
                                                                                         float workablePageWidth)
                                                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getPageSize

        private static PDRectangle getPageSize()
      • getBengaliTextFromFile

        private static java.util.List<java.lang.String> getBengaliTextFromFile()
                                                                        throws java.io.IOException
        Throws:
        java.io.IOException