fonts

Why is my PDF missing several characters?

In spite of the abundance of documentation on how to use font files, and how to create documents with text in different languages, people are still asking the same question in many different variations. That's why this separate entry was made, using a different phrasing of the same question that was answered many times before.

Undefined

Which languages are supported in pdfHTML?

This question has been asked several times on Stack Overflow. For instance on Aug 2, '16 by Krishna Mohan Mathakala, on Dec 18, '15 by Irshad Khan,

Undefined

Chapter 6: Using fonts in pdfHTML

Up until now, we haven't spent much attention to the fonts that were used when we converted HTML to PDF. We know that Helvetica is the default font used by iText when no font is specified (chapter 2), and we know that pdfHTML ships with some built-in fonts if you need to embed a font (chapter 4), but we didn't get a clear overview of which fonts are supported as of yet.

There are two things you need to know before reading this chapter:

Undefined

iText 7 font examples

iText 7 font examples, including: colored text, Czech example, examples Font Tutorial, language-specific examples, reuse a font from an existing PDF, showing special characters, type 3 font, unembed a font, using fonts, ... How to make a single letter bold within a word? How to apply color to Strings in a Paragraph? How to use Cyrillic characters in a PDF? How to display indian rupee symbol? Why isn't the Rupee symbol showing? How to print mathematical characters like ∈, ∩, ∑, ∫, ∆ √, ∠?

Undefined
Tags: fontsencodinglanguagesiText 7
These examples were written in the context of the tutorial Using fonts in PDF and iText .
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(PdfEncodings.java:186)
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.