Forum Bugs

Can't open css file

dkessler
I have '<link rel="stylesheet"...' links at the top of my html page. Nevertheless, when I call the java class com.princexml.Prince and use the 'addStyleSheet(String)' method I provide an absolute path of a copy of the css file. The page renders correctly, however in the log I get the following message "/css/testPrint.css: warning: can't open input file: No such file or directory". How do I make it aware/ignore the path specified in the html.

dkessler
mikeday
You can specify the base URL of the document using setBaseURL(), for example to a HTTP URL, so that the path to the CSS file will resolve correctly.

Alternatively, if you don't actually need the file because you're specifying it externally with addStyleSheet() then just ignore the warning.