function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
thunksalotthunksalot 

<Style> tag not rendering after Summer 12 update in PDF-rendered VF component

For over a year now, my org has been generating and sending invoices and receipts using VF Components that are rendered as PDFs and attached to VF Email Templates.  The invoices and receipts each use CSS styles defined within a <style> tag in the header.  I just discovered that after the Summer '12 release, those styles are no longer being rendered.  As a result, the CSS style definitions are being printed at the top of the PDFs and the invoices and receipts have no styling.

 

Is anyone else having this problem?  I'm on na7.  I don't see it in the Known Issues but have submitted a support case.

 

I'm going to try moving the style definitions into a CSS stylesheet, loading that as a static resource and then referencing it with the <apex:stylesheet> tag.  Hopefully, that will work.  If not, I'm not sure what to try next.

 

Best Answer chosen by Admin (Salesforce Developers) 
thunksalotthunksalot

I'm happy to report that the work-around of moving the styles defined within the <style> tag into an external CSS stylesheet that I then uploaded as a Static Resource and linked in with the <apex:stylesheet /> tag worked!