Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iText 7 - HTMLWorker and ParseXHtml missing

Tags:

itext

itext7

I was not able to find HTMLWorker, ParseXHtml, Document and other related classes in iText 7 (unlike in iText 5). Can anybody tell me how to convert HTML file to PDF using iText 7 ?

Thank you, Sumanasa

like image 314
Sumanasa Avatar asked Jan 05 '23 23:01

Sumanasa


1 Answers

  1. HTMLWorker has been deprecated many years ago. In iText 5 you should really, really use XMLWorker. iText 5 is EOL (only security updates, no added functionality) so please migrate to iText 7.
  2. For iText 7, use the add-on pdfHTML. See Alexey's answer below.
like image 134
Amedee Van Gasse Avatar answered Jan 10 '23 15:01

Amedee Van Gasse