iText 7

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...
Open source versions
Good news for our community of developers! We've decided to make our iText 7 add-ons pdfHTML , pdfSweep , pdfInvoice and pdfDebug open source under the AGPL license - as was already in place for iText 7 Community . You asked, and we listened. We agree that there is a lot of value in having access to add...
Tags: ChangelogiText 7
October 30, 2017
October 30, 2017, release of iText 7.0.5, pdfSweep 1.1.0, pdfHTML 1.0.2, pdf2Data 1.2.0, and pdfInvoice 1.0.2.

Chapter 7: Frequently Asked Questions about pdfHTML

Over the years, we've received many questions about converting PDF to HTML.

In this chapter, we'll answer those questions that were asked most frequently.


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:


Chapter 5: Custom tag workers and CSS appliers

In this chapter, we'll change two of the most important internal mechanisms of the pdfHTML add-on.

  • We'll override the default functionality that matches HTML tags with iText objects, more specifically the DefaultTagWorkerFactory mechanism, and

  • We'll override the default functionality that matches CSS styles to iText styles, more specifically the DefaultCssApplierFactory mechanism.


Chapter 4: Creating reports using pdfHTML

Roughly speaking, there are three major ways to create PDF documents using iText,

  1. 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.


Chapter 3: Generating PDF based on Media Queries

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.