HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › CSS Styles aren’t applied, can someone help me? › Re: Re: CSS Styles aren’t applied, can someone help me?
June 16, 2010 at 15:19
#28064
Try to switch PD4ML into debug mode with pd4ml.enableDebugInfo() and inspect STDOUT/server’s log which URL it actually tries to load.
If in your HTML document references are defined as /path/to/stylesheet.css and in the debug output they appear prefixed with file:, pd4ml.useServletContext() call should help.
But it is a better idea to reference CSS stylesheets with relative paths (like ../mycss/stylesheet.css).