Does anybody done pdf generation by means of LWC(with Visualforce page). I have done following code and it is working fine, until renderAs comes. If anybody knows a solution/workaround, please let me know. PFB code snippet below:
LWC - helloWorld
<template>
Hello World
</template>
helloWorldApp - for dependency
<aura:application access="GLOBAL" extends="ltng:outApp">
<aura:dependency resource="c:helloWorld"/>
</aura:application>
HelloWorldPdf - Visualforce page
<apex:page renderAs="PDF">
<apex:includeLightning />
<div id="lightning" />
<script>
$Lightning.use("c:helloWorldApp", function() {
$Lightning.createComponent("c:helloWorld", {} ,
"lightning",
function(cmp) {
// do some stuff
}
);
});
</script>
</apex:page>