You need to sign in to do that
Don't have an account?
Ajinkya Deshmukh 16
Display lightning component data on vf page and render as PDF.
I have created the lightning component and want to display it on VF page and render as PDF. For this, I have created a Lightning Dependency App and added it to VF page using $Lightning.createComponent(String type, Object attributes, String locator, function callback).
I have followed steps mentioned in the following documentation: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm
But nothing is displayed in PDF.
Here is the code:
App:
VF Page:
Please help to display data in PDF format.
I have followed steps mentioned in the following documentation: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm
But nothing is displayed in PDF.
Here is the code:
App:
<aura:application access="GLOBAL" extends="ltng:outApp"> <aura:dependency resource="c:AccountSnapshotComponent"/> </aura:application>
VF Page:
<apex:page renderAs="pdf" standardStylesheets="false"> <apex:includeLightning /> <div id="lightning" /> <script> $Lightning.use("c:AccountSnapshotApp", function() { $Lightning.createComponent("c:AccountSnapshotComponent", { label : "Press Me!" }, "lightning", function(cmp) { // do some stuff }); }); </script> </apex:page>
Please help to display data in PDF format.
There is couple of things I would try:
1. Create a second VF page/ vf compoent where you just add the lightning component to it, and add that second page/ vf compoent to this page where you just include that second page/ vf compoent. I am not sure if that is gonna work, try and let us know.
1. This is little overdo, may not be straight answer to your question on how to include ltng comp to vf page, but If you want to have your page in lightning style, summer 18 has a new attribute to page that transforms the entire page into lightning : check this : https://releasenotes.docs.salesforce.com/en-us/summer18/release-notes/rn_vf_lightningstylesheets_ga.htm ;
HTH
Prabhanjan
Seems we are not able to use Aura with a PDF page.
Hi !!
Was anyone able to find a solution to this?