I have a scenario where i have to hide and show an image in a Einstein dashboard conditionally. I didnt find a way to do it, so i added the dashboard within a lightning component where i can control the image hide and show.

Now i want to print the dashboard with the image to a pdf. i tried using


but while printing

  1. background graphics and colors are not displaying (even i have checked "Background Graphics" in setting.)
  2. And page gets cut from the middle.

Any solution to the above problem.

<aura:component implements="lightning:isUrlAddressable,force:appHostable,force:lightningQuickActionWithoutHeader,flexipage:availableForAllPageTypes" access="global" > 
        <img width="220" height="100" src="https://rsb.org/wp-content/uploads/2018/04/Test.png"/> 
        <lightning:button label="Print" onclick="{!c.print}"/>
        <lightning:layout >
            <lightning:layoutItem padding="around-small" size="12">
                <wave:waveDashboard  dashboardId="XXXXXXXXXXXX" 
                                    openLinksInNewWindow="false" showHeader="false"></wave:waveDashboard>

Lightning App

<aura:application extends="force:slds" access="GLOBAL" implements="lightning:isUrlAddressable,force:appHostable,force:hasRecordId">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.