You need to sign in to do that
Don't have an account?

Render-as PDF: Where'd the colors go?
Using the page attribute render-as="pdf" is giving me a monochrome PDF despite the use of CSS on the page to set the background-color in some table cells. The background colors render fine in HTML but are absent in PDF. Is it possible to get color in the PDF (color fidelity not an issue)?
Hi..
Its work for me... Can u post ur code
Use inline style or styleclass .. The following code perfectly work for me..
VF code:
<table width="100%">
<tr>
<td> Test</td><td style="color:green">Green</td>
</tr>
</table>
css file :
background-color: #add3c8;
text-align:center;
border: none;
}
<br>TH {<br> background-color: #99CCFF;<br> align: center;<br>}<br>.criteria {<br> background-color: #FFFF92;<br> font-weight: bold;<br>}<br>
Criteria
...
...
WITHOUT the page attribute 'render-as="pdf",' the colors render as I'd expect: the first row, which I've given the "header" facet, renders with the TH style, and the subsequent rows, which I've put in the "criteria" style class, render with the .criteria style.
If I add the render-as attribute, however, the page renders monochrome.
Thanks.
[apex:page controller="Controller" showHeader="false" standardStyleSheets="true" sidebar="false"]
[style]
TH {
background-color: #99CCFF;
align: center;
}
.criteria {
background-color: #FFFF92;
font-weight: bold;
}
[/style]
[apex:dataTable value="{!query}" var="var" border="1"]
[apex:column styleClass="criteria"]
[apex:facet name="header"]Criteria[/apex:facet]
[apex:outputText value="{!var.Name}"/]
[/apex:column]
...
...
[/apex:dataTable]
WITHOUT the page attribute 'render-as="pdf",' the colors render as I'd expect: the first row, which I've given the "header" facet, renders with the TH style, and the subsequent rows, which I've put in the "criteria" style class, render with the .criteria style. If I add the render-as attribute, however, the page renders monochrome. Thanks.
Hi..
Hello,
I have the same problem using style sheets.
Will there be a fix for this soon ?
Thanks,
Michel