I am using this - https://github.com/danfickle/openhtmltopdf to convert from html to pdf. (Which uses Apache PDFBox internally and that's where I guess the problem is).
Everything works well in development mode - I am using quarkus. When I run - mvn clean quarkus:dev and generate the pdf it display properly (with html table and all) as expected.
However when I build natively (mvn package -Pnative) and than generate pdf, it messes up all display. Everything is just one string and it fails to understand css too.
Hard part is, I don't see any errors so can't figure out what's going wrong.
Htmlto pdf code, its really basic -
PdfRendererBuilder builder = new PdfRendererBuilder();
builder.useFastMode();
builder.withHtmlContent(htmlContent, null);
builder.toStream(os);
builder.run();
Pass any string (Well formatted html) and you will see the difference between two different execution style.
Why is this happening?