Forum How do I...?

Conditional Styling

bonniec
Is there a way to apply conditional styling to the PDF? For example, if a page is from a specific path, use a blue header; if a page is from another path, use a green header. We would like to be able to print a specific color for each of our products. We are able to do this on our site, but it's not carrying over to the PDF.
mikeday
How do you currently do it on your site?
bonniec
We use JavaScript to control the CSS conditionally.
mikeday
Right, does it check the current document location? Is Prince being applied to the same URL, or are you piping the local file directly, in which case you may need to explicitly set the base URL.