• Antonio Varvaro
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello,

I have a Visualforce page, designed to generate PDF Document.
It looks like:
<apex:page standardController="Opportunity" showHeader="false" renderAs="pdf">
<h2 style="font-family: sans-serif; text-align: center;">My PDF</h2>
<p><strong>Soci&eacute;t&eacute; : </strong>{!Opportunity.Account.Name}<br />
    <strong>Nom : </strong>{!Opportunity.Amount}<br />
    <strong>Pr&eacute;nom : </strong>{!Opportunity.Amount}<br />
    <strong>Adresse : </strong>adresse</p>
</apex:page>

Using Lightning, I would like to:
  • Have a button on my Opportunity page, "Generate PDF"
  • On click, open an iframe over the same page, that displays the PDF (from the Visualforce page)
  • Have two buttons on this iframe: Save // Cancel
  • If I click save, it saves the PDF as a File, related to the current record
Any suggestions?
Thanks!