1

I need to keep all fonts the same when upgrading from pdfHTML 1.01 (default Helvetica in paragraph etc) to pdfHTML 2. How can this be accomplished the easiest way, using fontProvider?

I need all formatting to be the same in newest pdftohtml (iText 7) as it was in the old (iText 5). I am only familiar with default font changes

        FontProvider fp = new FontProvider();
        fp.addStandardPdfFonts();
        fp.addDirectory(resources);
        props.setFontProvider(fp);

This results in Helvetica Bold being used in some places in iText5, while in iText 7 it is not iText7 fonts used iText5 fonts used

  • pdfHTML 1.x.y is different from pdfHTML 2.v.w and therefore they may product different conversion results which is pretty natural (otherwise why would a new version be released anyway). So either the difference in the behavior is a regression, or an improvement. To better understand which type this change is of, please minimize your HTML sample file and post it to your question, together with your minimal reproducible code (the current code is only a short snipped that is not reproducible), and explain the expected result. – Alexey Subach Apr 12 '22 at 18:20

0 Answers0