Hi Chang,

Stylising web rendered PDF is as feature included in the PDF  
proprietary format.
You have 3 entry point for this, depending on how you generate your PDF.

1 : you can set a custom CSS class for any element of the PDF when you  
create it with Adobe Acrobat Pro 8, or, if you dynamically regenerate  
your PDF excracting each element, you can set a CSS class for each  
type or named element.

2 : you can join a custom CSS file to be applied on your PDF  
programmaticaly. This depend on the component you use for rendering  
PDF to HTML. This could be (ASP.net) objMyPDFDocument.customCssFile or  
objMyPDFWriter.RenderingRules (this one would allow XSLT too, using a  
RulesFactory I guess). If ou details your methods I can help you more  
on this.

3 : For printing, you can use the @media clause in order to give  
correct CSS classes to print only.
@media screen {
   /* Specific Screen rules */
}
@media print {
   /* Specific Print rules */
}
@media all {
   /* Non-specific rules */
}


Nevertheless, the better way to make stylised PDF document is ... to  
render them in XML format and then use XSLT, or render them in HTML  
and use standard CSS. Components exists on the web, but they ae very  
expensive.


Cheers,

Sébastien
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to