About pdf2Data pdf2Data is an add-on for iText7 to recognize data inside PDF documents in an intuitive and predictable manner. It provides a mechanism to extract predefined data fields from the PDF documents based on the same template (for example, an invoice coming from the same supplier). A new release We are proud to inform you about the latest release: pdf2Data 1.2.0 not only for Java , but now also for...
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:
Roughly speaking, there are three major ways to create PDF documents using iText,
You can create a PDF document from scratch using iText objects such as Paragraph, Table, Cell, List,... The advantage of this approach is that everything is programmable, hence configurable just the way you want it. The disadvantage is that you need to program everything; even small changes such as changing one color into another, require a developer to change the Java code of the application, to recompile the code, etc.
In chapter 1, we converted the same hello.html page to different PDF documents that looked (almost) identical, using different snippets of Java code. In this chapter, we'll convert one and the same HTML file to different PDF files with a different layout.