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

PDF button similar to quote


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?
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> 

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