You need to sign in to do that
Don't have an account?
Alex Waddell 17
How to create boxes in Salesforce using Visualforce
Hello Everyone,
I am trying to create 2 boxes that I can place Apex:Outputfield's inside to have Salesforce populate the To's and From's for my document.
I need the page to RenderAs="PDF" so i am limited to the older css styling rather than the new SLDS styling
below is my code so far:
Any Ideas?
I am trying to create 2 boxes that I can place Apex:Outputfield's inside to have Salesforce populate the To's and From's for my document.
I need the page to RenderAs="PDF" so i am limited to the older css styling rather than the new SLDS styling
below is my code so far:
<apex:page standardController="Account" renderAs="pdf" > <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <style type="text/css"> body { font-family: sans-serif; font-size:12px; } </style> </head> <body> <table cellpadding="6" width="100%"> <tr> <td> <apex:outputPanel > <apex:image url="/servlet/servlet.FileDownload?file=0151D0000005bAO" width="150" Height="75"/> </apex:outputPanel> </td> <td> <apex:outputPanel > Case Information </apex:outputPanel> </td> <td> <apex:outputPanel > Form 2067 </apex:outputPanel> </td> </tr> </table> <table cellpadding="6" width="70%"> <tr> <td> <apex:outputPanel > To: </apex:outputPanel> </td> <td> <apex:outputPanel > From: </apex:outputPanel> </td> </tr> </table> </body> </html> </apex:page>
Any Ideas?
All Answers
I just had 1 more question. Where do I put this section in my code?
I placed it right into my Visual force page and it displayed as text. As shown below.
Do I need to make a class and then call on that class?
It is a CSS style like body but I am not sure that your problem will be solved for a VFP + PDF but the display is correct in pure HTML
It is a first idea that works in simple HTML.
Hey Alex,
You should put this piece of code into style as you have done previously in your first post. This is used for the style of your VF page body elements.
I hope this will help you.
Thanks.