• Tisha Mick
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I have a VF page (standard controller) with an iframe URL and I want the page to be downloaded as pdf or a screenshot on button click.

The issue is that, when i render the page as pdf or when i update my code to capture the screenshot, all i'm seeing is the plain/blank screen instead of page content.

So, as a workaround i am using print option so that i can save the record as pdf.

Below is my VF Page:
 
<apex:page standardController="Account" showheader="false" sidebar="false">
       <apex:form >
            <apex:commandButton value="Print" onclick="window.print();"/>
        </apex:form>
  <apex:iframe src="https://app.powerbi.com/view?r=<custom-url>'" height="540" width="100%" frameborder="0">
  </apex:iframe>
</apex:page>

 Can anyone please suggest the changes to the above code so that I can download the vf page as pdf or screenshot instead of printing and saving it as pdf