+ Start a Discussion
Charlie CoxCharlie Cox 

Flipping Text when rendered as pdf

I am making name tags based on a contacts name. The page is rendered as a pdf so the contact can print their name tag easily. In order to get the page to be landscape I had to use: 
<style>
     @page { size:landscape; }
</style> 

and set the API version to 26.0.

To flip the text I am using this CSS:
<style type="text/css">
.flipTxt {
      -webkit-transform: rotate(-180deg);
      -moz-transform: rotate(-180deg);}
</style>

When this is applied to <h1> tag in a normal VF page it works fine but when renderAs="pdf" it no longer works. Does anyone have any idea why this happeneds or how it can be fixed?


Thanks.
logontokartiklogontokartik
On the PDF's you need to add the css as inline. so if you want to use the flip on <h1> tag, try using it inline like 
<h1 style="-webkit-transform: rotate(-180deg); -moz-transform: rotate(-180deg);"/>
Charlie CoxCharlie Cox
Thanks for your quick answer, I should have put this in my original question but I tried that and it also did not work. Do you have any other solutions?

Thanks.
logontokartiklogontokartik
Hmm. actually this has been one of the oldest unsolved questions on the forums. I am not sure if you would be successful but can you add applyHtmlTag="false" on the <apex:page> and also put your css within <head></head> and see if it works. 

Here are some of the posts with similar issues

http://salesforce.stackexchange.com/questions/18454/rotate-text-in-visualforce-pdf

https://developer.salesforce.com/forums/ForumsMain?id=906F0000000998lIAA