You need to sign in to do that
Don't have an account?
Jennifer Prather
Styling a Visualforce PDF page
I am having difficulty styling the PDF tp make it more readable for users. I was trying to create each section in the table format. Does anyone have any suggestions on how to do that?
<apex:page standardController="Committee_Applicant__c" renderAs="pdf"> <head> </head> <body> <center> <h1> TVC </h1> <h3> Application </h3> </center> <h4> Part 1: Applicant's Section </h4> <table> <tr> <th>Applicant's Name:</th> <td><apex:outputText value="{!Committee_Applicant__c.Applicants_Name__c}"/></td> </tr> <tr> <th>Home Address:</th> <td><apex:outputText value="{!Committee_Applicant__c.Home_Address__c}"/></td> </tr> <tr> <th>City:</th> <td><apex:outputText value="{!Committee_Applicant__c.Home_City__c}"/></td> <th>State:</th> <td><apex:outputText value="{!Committee_Applicant__c.Home_State__c}"/></td> <th>ZIP Code + 4:</th> <td><apex:outputText value="{!Committee_Applicant__c.Home_ZIP_Code__c}"/></td> </tr> </table> <h4> Part 2: Business Section </h4> <table> <tr> <th>Applicant's Job Title/Company:</th> <td><apex:outputText value="{!Committee_Applicant__c.Applicants_Job_Title_Company__c}"/></td> </tr> <tr> <th>Main Responsibilities:</th> <td><apex:outputText value="{!Committee_Applicant__c.Main_Responsibilities__c}"/></td> </tr> <tr> <th>Work Address:</th> <td><apex:outputText value="{!Committee_Applicant__c.Work_Address__c}"/></td> </tr> <tr> <th>City:</th> <td><apex:outputText value="{!Committee_Applicant__c.Work_City__c}"/></td> <th>State:</th> <td><apex:outputText value="{!Committee_Applicant__c.Work_State__c}"/></td> <th>ZIP Code + 4:</th> <td><apex:outputText value="{!Committee_Applicant__c.Work_ZIP_Code__c}"/></td> </tr> <tr> <th>Work Email:</th> <td><apex:outputText value="{!Committee_Applicant__c.Work_Email__c}"/></td> <th>Work Phone Number:</th> <td><apex:outputText value="{!Committee_Applicant__c.Work_Phone_Number__c}"/></td> </tr> </table> <h4> Part 3: Committee Selection Section </h4> <b><p> Select the committee for which you are applying for membership: </p></b> <table> <tr> <th>Veterans Employment and Training Advisory Committee:</th> <td><apex:outputText value="{!Committee_Applicant__c.VET_Advisory_Committee__c}"/></td> <th>Preference:</th> <td><apex:outputText value="{!Committee_Applicant__c.VET_Preference__c}"/></td> </tr> <tr> <th>Fund for Veterans' Assistance Advisory Committee:</th> <td><apex:outputText value="{!Committee_Applicant__c.FVA_Advisory_Committee__c}"/></td> <th>Preference:</th> <td><apex:outputText value="{!Committee_Applicant__c.FVA_Preference__c}"/></td> </tr> <tr> <th>Veterans County Service Officer Advisory Committee:</th> <td><apex:outputText value="{!Committee_Applicant__c.VCSO_Advisory_Committee__c}"/></td> <th>Preference:</th> <td><apex:outputText value="{!Committee_Applicant__c.VCSO_Preference__c}"/></td> </tr> </table> <br/> <table> <tr> <th>Provide any additional information that you would like the selection committee to consider:</th> </tr> <tr> <td><apex:outputText value="{!Committee_Applicant__c.Additional_Information__c}"/></td> </tr> </table> <br/> <table> <tr> <th>Briefly tell us why you would like to serve on the selected committees.</th> </tr> <tr> <td><apex:outputText value="{!Committee_Applicant__c.Why_Serve__c}"/></td> </tr> </table> <br/> <table> <tr> <th>Briefly explain your experience with the Open Meetings Act (if applicable).</th> </tr> <tr> <td><apex:outputText value="{!Committee_Applicant__c.Open_Meetings_Act__c}"/></td> </tr> </table> </body> </apex:page>
Have you checked all the considerations that needs to be taken into account while implementing this scenario, please find the link for reference below:
>> https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_considerations.htm
I hope this helps and in case if this comes in handy can you please choose this as the best answer so that it can be used by others in the future.
Regards,
Anutej
http://webtricksandtreats.com/table-style-css/
https://www.w3schools.com/tags/att_td_colspan.asp