Fonts (iText 7)

My Code: public static final String [ ] tempString = { "KozMinPro-Regular.otf" , "UniJIS-UCS2-H" , pharseString } ; bf = BaseFont. createFont ( tempString [ 0 ] , tempString [ 1 ] , BaseFont. NOT_EMBEDDED ) ; The exception: java.nio.charset.UnsupportedCharsetException: UniJIS-UCS2-H at java.nio.charset.Charset.forName(Unknown Source) at com.itextpdf.text.pdf.PdfEncodings.convertToBytes(
I am implementing a PdfPageEventHelper event to add a footer as shown in this code snippet: ColumnText.showTextAligned(cb, Element.ALIGN_RIGHT, new Phrase(String.format(" %d ", writer.getPageNumber()), footerFont), document.right() - 2 , document.bottom() - 20, 0); I need to add 3 lines, but I don't find how to calculate the distance between the lines. Each line has different font size. What should I use as XXX value in document.bottom() - XXX ?
If I say: var georgia = FontFactory.GetFont("Georgia Regular", 10f); it doesn't work. When I check the state of the variable georgia, it has its Family property set to the value UNDEFINED and its FamilyName property set to Unknown . It only works if I actually load and register the font file.
I am generating PDF files from XML data. I calculate the height of a paragraph element like this: float paraWidth = 0.0f; for (Object o : el.getChunks()) { paraWidth += ((Chunk) o).getWidthPoint(); } float paraHeight = paraWidth/PageSize.A4.getWidth(); But this method does not works correctly.
I have an application, that extracts headings out of pdf files. The documents that the application is supposed to work with, all have more or less coherent structure and formatting. In fact, telling if a text chunk is bold or not, is very important.
I have been trying to create PDF files using iText. I have found that Superscript (0,4,5,6,7,8,9) and Subscript (0,1,2,3,4,5,6,7,8,9) are not allowed in the default font. Only Superscript 1,2,3 are allowed in the default setting. A String in my PDF contains subscript and superscript characters, is there a way I can display them in PDF?
Tags: fontssuperscriptiText 7
I want to format a date like this: 14th may 2015. However, the th in 14 should be in superscript as is what happens when you use the "sup" tag.
I'm starting with iTextSharp and wondering if there is any reason why setting the font of a Phrase after the construction of the object doesn't work. Is there any reason, do I miss something?
Given a certain available width, how do I define the font size for a snippet of text, so that it matches the available width.
I am using iText to generate PDFs. In these PDFs, I need to add two String s on one line. The first String ( string1 ) length is between 1 and 10. The length of the second String ( string2 ) is unknown, but the combined length of string1 and string2 should not exceed 10 characters.