+ Start a Discussion
ArmanMArmanM 

PDF button similar to quote

Hi,

I am making a custom object that has a generate plan(pdf) button. This object has a related list called where Deliverables__c exist. Deliverables__c is a child object in master detailed relationship to the parent object; Plan__c.

Master Object: Plan__c
Detailed/child object: Deliverables__c
 
For the PDF button I need it to have a similar functionality to Quote object, where each line item of Deliverables__c will be displayed in the PDF. Basically I would need to get information from its related list items from Deliverable__c into this PDF in Plan__c object. How can I do this?
  
Thanks,
Arman 
Navin SoniNavin Soni
Hi Arman,

you can embed a PDF in a VF page via a data URI. For example...
<apex:page controller="myPDF" sidebar="false" contentType="application/pdf"> 
    <script> window.location.href = "data:application/pdf;base64,{!myData}"; </script> 
</apex:page>


You will need to test on different browsers. Note that you need the base64 encoded data.
ArmanMArmanM
Hey Navin,
I'm not quite sure what you mean. How can I apply this in my situation?