function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Student AdminStudent Admin 

Need to improve PDF extract from my custom page layout

Hi guys,

I must deliver this to my customer today :-(
Here is the task: I have been requested to create a custom object called " CANDIDATE", this object is to have an overview of candidates information before or after job interviews. I am pretty satisfied with the new object creation however the challenge is coming from the pdf file extract from this custom page layout.
So when you go to the CANDIDATE page layout, click on button "IMPRESSION" (print in English), it is circled in red from the attached file. It should extract a pdf file. But the issue is this PDF looks horrible. See attached for yourself.
Here are the corrections to be adjusted:
- I need to have all the titles (see circled in red) into red color
- All the characters that you shown with a blue arrow should be separated with a space
- And finally, the section Personalité & Motivation needs to look like exactly the same as the one from the SF page layout.

You'll find also attached, the PDF coding so you do not have to write a new one from scratch, I just need to see what went wrong with my coding and if someone could kindly make the correction for me :-)

Thank you in advance folks :-)
Regards,
Sandrine
Page codingPDFCandidate Layout
Thank you very very much in advance.
James LoghryJames Loghry
First of all, you're likely not going to have this ready for your customer today.  I would set those expectations with them as soon as possible.  Next, you'll want to use CSS for styling your PDF.  As far as styling goes, it's pretty limited for Salesforce's VF generated PDFS, but you should be able to do simple stuff like color the headings you want red, etc.

Here's a good read on how to utilize CSS to style your print media or PDF:
http://www.smashingmagazine.com/2015/01/designing-for-print-with-css/
Student AdminStudent Admin
Thanks James. Yes indeed, I had to tell my customer that I would have to report the work to tomorrow.