+ Start a Discussion
StrangeRoutinesStrangeRoutines 

PDF rendering bug, comments in style sheet stop selector from working

I recently had a problem/bug with PDF rendering for small caps. I figured I could simulate small caps by applying two different font sizes to the text line but to my surprise, when I tried it, I encountered another PDF rendering bug.

 

In this situation, the style sheet had some selectors with a comment on the same line as the selector. This was fine when displaying the VF page normally, but, when rendering in PDF, the selectors were not applied. When the comments were moved to their own lines, the PDF render then worked fine!

 

The involved page and style sheet are lengthy and fairly complex so I will post them only if somebody is actually interested in seeing them.

 

In summation, the rule is obvious. If you are rendering in PDF,  comments must be placed on their own lines in the style sheet. I would even be cautious about placing comments inside the style declaration (i.e. between the curly braces)!

chandra2ravichandra2ravi

u write style class apply to tags is not working in pdf generation. u write on <td style="......"> this is only working in pdf gen.