Fabian Mandelbaum wrote:
> 
> is there a way to specify that printed output is to be rendered using
> a different stylesheet than the one used for editing/display inside
> XXE?
> 
> Can one change the CSS used for printing? (like the famous 'printer
> friendly' view/icon/link/button one sees in many web pages).
> 
> I'd like to specify a different CSS to be used when the user selects
> File->Print (mainly because the default CSS used in the customization
> has many elements non-collapsed, thus printed output looks more like
> the structure of the doc, than the doc contents itself).

There is no way to specify a different CSS to be used when printing.
However, you can add "@media print {}" sections to your CSS. The rules
contained in these sections are applied only when using File|Print.

XHTML example (XXE_install_dir/addon/config/xhtml/css/xhtml.css):
---
@media print {
    * {
        background-color: transparent;
        line-height: 1.2;
    }

    base,
    meta,
    link,
    style,
    script,
    noscript {
        display: none;
    }

    meta[name=author][content],
    meta[name=date][content] {
        display: block;
        text-align: center;
        /*
         * Without paragraph(), a static text label is used
         * and words are not wrapped.
         */     
        content: paragraph(attr(content));
    }
}
---





Reply via email to