Forum How do I...?

Automatically using stylesheets linked to in XHTML documents

apoco
Since Prince allows you to enter a base URL for an input document, I assumed this meant that if an XHTML document contained any links to CSS files, those CSS files would be used for the document's stylesheets. Instead, it looks like none of the stylesheets linked to in my XHTML document are getting being loaded. Does Prince support the automatic loading of stylesheets? And if so, what do you have to do to get it to work?

(if the feature isn't supported, I think it would be a fantastic feature to add).
mikeday
Style sheets should be loaded and processed automatically, this was one of the first features we ever added to Prince. :)

Are you using the HTML <link> element, a CSS @import rule, or the xml-stylesheet processing instruction? Are you getting any errors or warnings in the Prince output log?
apoco
Oh my goodness, thanks for the quick and helpful reply. I was using the .NET assembly to call Prince and hadn't thought to test using the command line. I guess the .NET library simply spawns a process, huh?

Once I tested via the command line, I discovered that my problem was all due to a permissions issue; the requests to fetch the style sheets were getting redirected to a login form. Once I removed authorization restrictions from the directories hosting the style sheets, Prince was able to do its thing beautifully. Duh :oops:.

Thanks again for the help.