Class BengaliPdfGenerationHelloWorld
java.lang.Object
org.apache.pdfbox.examples.pdmodel.BengaliPdfGenerationHelloWorld
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static PDRectanglegetReAlignedTextBasedOnPageHeight(List<String> originalLines, PDFont font, float workablePageHeight) getReAlignedTextBasedOnPageWidth(List<String> originalLines, PDFont font, float workablePageWidth) static void
-
Field Details
-
LINE_GAP
private static final int LINE_GAP- See Also:
-
LOHIT_BENGALI_TTF
- See Also:
-
TEXT_SOURCE_FILE
- See Also:
-
FONT_SIZE
private static final int FONT_SIZE- See Also:
-
MARGIN
private static final int MARGIN- See Also:
-
-
Constructor Details
-
BengaliPdfGenerationHelloWorld
private BengaliPdfGenerationHelloWorld()
-
-
Method Details
-
main
- Throws:
IOException
-
getReAlignedTextBasedOnPageHeight
-
getReAlignedTextBasedOnPageWidth
private static List<String> getReAlignedTextBasedOnPageWidth(List<String> originalLines, PDFont font, float workablePageWidth) throws IOException - Throws:
IOException
-
getPageSize
-
getBengaliTextFromFile
- Throws:
IOException
-