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
LogeshLogesh 

Text rotation in visualforce rendered as PDF

Hi Friends,

 

I need y'all help to rotate text to 270 degree in visualforce which is rendered as PDF. The text is within <td> or <div> tag. I used CSS attributes

 

-webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg); 

 

But as the name implies, it worked only with web page. Is there any other way to rotate text in pdf?

 

Thanks,

Logesh

Best Answer chosen by Admin (Salesforce Developers) 
LogeshLogesh

Hi Maros/All,

 

Even moving to stylesheet to static resource didn't make the text to rotate. Since the visualforce engine didn't render the CSS to rotate the text. I created a vertical text with Ms Power point.

* Took the screenshot of the same.

* Used it as a image to display the vertical text in visualforce page rendered as PDF.

 

 

 

Thanks,

Logesh

All Answers

Maros SitkoMaros Sitko

Where you have this css styles? When I made pdf pages, I need add my all CSS styles into extra file, which I upload (without zip, just .css file) into static resource and in page include it. so My page started:

 

<apex:page controller="mycontroller" sidebar="false" showHeader="false"  renderAs="pdf"  standardStylesheets="false">
<apex:stylesheet value="{!$Resource.pdfStyles}"/>

 

I do not try do it with your issue, so, this is only suggestion

LogeshLogesh

Thanks Maros!! I've my styles within <apex:page> tag. I defined the style classes in <style> tag. Other styles work properly. I'll give a try with your approach & post back if it works.

LogeshLogesh

Hi Maros/All,

 

Even moving to stylesheet to static resource didn't make the text to rotate. Since the visualforce engine didn't render the CSS to rotate the text. I created a vertical text with Ms Power point.

* Took the screenshot of the same.

* Used it as a image to display the vertical text in visualforce page rendered as PDF.

 

 

 

Thanks,

Logesh

This was selected as the best answer