Forum How do I...?

Apply a User style sheet at higher priority than an Author style sheet?

AndyF
Hi guys,

I've been working to get PrinceXML to serve some content on our site, and I'm pleased to say that it's almost there. At the moment I'm trying to sort out a few problems that we've come across.

I've been looking into using the command line interface to introduce css print rules to our documents, as this would mean that we don't have to serve the Prince specific print styles as part of a regular request. Unfortunately the css priority determination system seems a bit limiting. We'd like to be able to override some of the styles in the browser css files, without having to resort to using !important everywhere.

In short I'd like to be able to add a css file from the command line with a priority between 4 & 5, is there any way to do this?

Thanks
mikeday
At the moment the only way to do this would be to use JavaScript to insert the style sheet into the document itself, so that it is processed as an author style sheet not a user style sheet.
AndyF
Hi Mike,

That's what we're doing at the moment, we were hoping for a slightly cleaner solution using the command line interface only.

Thanks