Skip to main content

Posts

Showing posts from October, 2015

Creating Super Awesome PDF's with Salesforce

Brief intro Salesforce PDF Salesforce under the hood uses "Flying-Saucer" rendering engine to render the pdf of the fly. Check out more about Flying-Saucer here : It basically supports CSS2.1 and minimal features of CSS3. I would recommend you to go through @Page css properties and this link for a better understanding http://www.antennahouse.com/CSSInfo/CSS-Page-Tutorial-en.pdf Lets get started: Case1 : Repeating Header / Footer In this example we will have our Logo as header and Page number as the footer  which will repeated in all the pages of the document. Demo The Code: <apex:page renderAs="pdf" standardStylesheets="false" showHeader="false" applyHtmlTag="false" > <head> <style> @page { margin-top:70px; margin-left:0px; margin-right:0px; size:portrait;