The functionality for the project that I am currently working is to get data from a WYSIWYG editor and convert all the input to a PDF document. The problem is sometimes there is necessary to add wider tables and this produces a truncated visualization of them.

To solve this problem, I added to the editor (specifically, CKEditor) a HR button but I renamed it to "Change page orientation", so users can click that before inserting a table. In Java, I used iText 7 to detect this element (<hr>) and change the page orientation. This works like a charm.

Example using iText with a simple table

Now, requirements changed and for license purposes we need to replace iText for another HTML to PDF converter, but we need to keep this functionality.

I found OpenHTMLToPdf and I liked it, but I didn't find the way to replicate this page orientation when a hr (or another specific element) is found.

How can I solve that? I can use whatever library as long as they are open source.

0

There are 0 best solutions below