HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › CSS of a HTML string rendering problem – Java › Re: Re: CSS of a HTML string rendering problem – Java
A good starting point to analyze the problem reasons is to switch debug on:
pd4ml.enableDebugInfo();
I suspect it will output to server’s log traces of attempts to load
file:/broker-module/BL.css
which is obviously incorrect. In order to let PD4ML interpret /broker-module/BL.css as a web path you would need to pass either the servlet context or HTTP request object to PD4ML. It could be done with the following API calls.
[language=java:1w9ymuy5]useServletContext(ServletContext ctx)
useHttpRequest(HttpServletRequest httpRequest, HttpServletResponse httpResponse)[/language:1w9ymuy5]