Skip to content Skip to sidebar Skip to footer

OpenOffice HTML & CSS : JODConverter

I'm using JODConverter in my application to convert a HTML file with basic CSS 2 to a PDF file. When I convert the file, the pdf is just a mess, And when I tried to view in openOf

Solution 1:

LibreOffice/Apache OpenOffice is a great application, but in this case it is not the right tool for the job. There are many applications that render HTML more effectively.

This worked for me, adapted from https://superuser.com/questions/592974/how-to-print-to-save-as-pdf-from-a-command-line-with-chrome-or-chromium.

./chrome.exe --headless --disable-gpu --print-to-pdf=file1.pdf http://www.example.com/

EDIT:

To make this call in Java, see How to execute system commands (linux/bsd) using Java.


Post a Comment for "OpenOffice HTML & CSS : JODConverter"