[SalesForce] Visualforce renderas pdf text rotation

I have created visualforce page which will be render as pdf.
In that I tried using transform:rotate(90deg); and writing-mode: vertical-rl; it's working fine in visualforce page but when renderas pdf mentioned css for text rotation is not applied.

<apex:page controller="RenderController" renderAs="pdf" sidebar="false" showHeader="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">
    <html>
        <body>
        <p style="writing-mode: vertical-rl;position: absolute;right: 35px;float: none;top: 50%;margin: 0;"> PT001-2018 © Candor Renting de Equipamentos S.A </p>
        </body>
    </html>
</apex:page>

Best Answer

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

<apex:page standardController="Account" renderAs="pdf" sidebar="false" showHeader="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false"> <html> <body> <div style="writing-mode: vertical-rl;position: absolute;right: 35px;float: none;top: 50%;margin: 0;"> <img src="{!$Resource.vertical_text}"/>
</div> </body> </html> </apex:page>

Related Topic