+ Start a Discussion
Bryant Daniels 46Bryant Daniels 46 

Is there a way to render a image 90deg when a visualforce page is renderAs PDF

Trying to find out if i can rotate an image once the visualforce page is rendered as a PDF, when it is rendered as HTML the image shows correctly the way you take the image also the css below works with it on HTML but not PDF which is strange because the other style is working for the page when it is in PDF. 
<style type="text/css" media="print">
			@page {
				size: landscape
			}
.imageClass {
				-webkit-transform: rotate(90deg);
				-moz-transform: rotate(90deg);
				-o-transform: rotate(90deg);
				-ms-transform: rotate(90deg);
				transform: rotate(90deg);
				height: 200px;
				width: 200px;
			}

<img src="{!'/sfc/servlet.shepherd/version/download/' + Document_Id__c}" alt="before photo" class="imageClass"


-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
Maharajan CMaharajan C
Hi Bryant,

CSS transforms property are not supported in PDF mode. Also, anything that starts with "-moz", "-ms", "-o", or "-webkit" are not supported.
https://salesforce.stackexchange.com/questions/206125/visualforce-page-renderas-pdf-styling-does-not-apply

I have aslo tried the above with applyBodyTag="false" also but no luck.

So better change your image in 90degree then utilize it.

Thanks,
Maharajan.C
Neil CummingsNeil Cummings
Our  web scraping Service  (https://it-s.com/our-services/data-tranformation-services/web-scraping-services/) provides high-quality structured data to improve business outcomes and enable intelligent decision making,
Our Web scraping service allows you to scrape data from any websites and transfer web pages into an easy-to-use format such as Excel, CSV, JSON, and many others