<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to convert dashboard to HTML Export using jsPDF? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333611#M21632</link>
    <description>&lt;P&gt;@Kimosoft2 - If your answer provided a working solution to your question please don't forget to resolve your post by clicking "Accept". That way others can easily find it if they're having the same issue. Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jun 2017 15:26:35 GMT</pubDate>
    <dc:creator>aaraneta_splunk</dc:creator>
    <dc:date>2017-06-02T15:26:35Z</dc:date>
    <item>
      <title>How to convert dashboard to HTML Export using jsPDF?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333609#M21630</link>
      <description>&lt;P&gt;i am trying to have export on HTML dashboard so i am using the jsPDF, am using the below script. also the chart comes out with the x-axis duplicated under each other as attached. any ideas?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; html2canvas(document.getElementById("panel1"), {
            onrendered: function(canvas) {

                var imgData = canvas.toDataURL('image/png');
             //   console.log('Report Image URL: '+imgData);
                var doc = new jsPDF(); //210mm wide and 297mm high

                doc.addImage(imgData, 'PNG', 10, 10);
                doc.save('sample.pdf');
            }
        });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3029i44521FD45791FFC0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 21:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333609#M21630</guid>
      <dc:creator>Kimosoft2</dc:creator>
      <dc:date>2017-06-01T21:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert dashboard to HTML Export using jsPDF?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333610#M21631</link>
      <description>&lt;P&gt;i changed the jspdf.js code in the below method and it worked fine &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;NodeParser.prototype.getChildren = function(parentContainer) {
    return flatten([].filter.call(parentContainer.node.childNodes, renderableNode).map(function(node) {
        var container = [node.nodeType === Node.TEXT_NODE &amp;amp;&amp;amp; node.parentElement.tagName !== "text" ? new TextContainer(node, parentContainer) : new NodeContainer(node, parentContainer)].filter(nonIgnoredElement);
        return node.nodeType === Node.ELEMENT_NODE &amp;amp;&amp;amp; container.length &amp;amp;&amp;amp; node.tagName !== "TEXTAREA" ? (container[0].isElementVisible() ? container.concat(this.getChildren(container[0])) : []) : container;
    }, this));
};
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Jun 2017 13:59:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333610#M21631</guid>
      <dc:creator>Kimosoft2</dc:creator>
      <dc:date>2017-06-02T13:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert dashboard to HTML Export using jsPDF?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333611#M21632</link>
      <description>&lt;P&gt;@Kimosoft2 - If your answer provided a working solution to your question please don't forget to resolve your post by clicking "Accept". That way others can easily find it if they're having the same issue. Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 15:26:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333611#M21632</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2017-06-02T15:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert dashboard to HTML Export using jsPDF?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333612#M21633</link>
      <description>&lt;P&gt;Hello @Kimosoft2,&lt;/P&gt;

&lt;P&gt;Do you think it's possible to export a full dashboard with this workaround? Can you describe the process, for example how do you call the export in the dashboard ? &lt;/P&gt;

&lt;P&gt;If it's possible can you share the full JS script ?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 13:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333612#M21633</guid>
      <dc:creator>baigura</dc:creator>
      <dc:date>2017-07-24T13:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert dashboard to HTML Export using jsPDF?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333613#M21634</link>
      <description>&lt;P&gt;Hello @baigura &lt;/P&gt;

&lt;P&gt;yes you can do that by adding a div containing all the rows with and id for example &lt;STRONG&gt;all&lt;/STRONG&gt; and then  call that div for the export , this is what i have done in mine so instead of &lt;STRONG&gt;Panel1&lt;/STRONG&gt; it will be &lt;STRONG&gt;all&lt;/STRONG&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 18:56:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333613#M21634</guid>
      <dc:creator>Kimosoft2</dc:creator>
      <dc:date>2017-07-24T18:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert dashboard to HTML Export using jsPDF?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333614#M21635</link>
      <description>&lt;P&gt;@Kimosoft2&lt;/P&gt;

&lt;P&gt;Thank you for the quick reply. Im a javascript beginner, can you describe in details your work? For example how do you call the export in your dashboard. If possible can you share the JS script? It would be very helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 08:52:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333614#M21635</guid>
      <dc:creator>baigura</dc:creator>
      <dc:date>2017-07-25T08:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert dashboard to HTML Export using jsPDF?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333615#M21636</link>
      <description>&lt;P&gt;ok no worries let me put a sample for you below&lt;/P&gt;

&lt;P&gt;HTML :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        &amp;lt;div id="row1" class="dashboard-row dashboard-row1"&amp;gt;
            &amp;lt;div id="panel1" class="dashboard-cell" style="width:60%"&amp;gt;
                &amp;lt;div class="dashboard-panel clearfix"&amp;gt;
                    &amp;lt;h2 class="panel-title"&amp;gt;&amp;lt;/h2&amp;gt;

                    &amp;lt;div class="panel-element-row"&amp;gt;
                        &amp;lt;div id="element1" class="dashboard-element table" style="width: 100%"&amp;gt;
                            &amp;lt;div class="panel-body"&amp;gt;&amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div id="panel2" class="dashboard-cell" style="width: 40%"&amp;gt;
                &amp;lt;div class="dashboard-panel clearfix"&amp;gt;
                    &amp;lt;h2 class="panel-title"&amp;gt;&amp;lt;/h2&amp;gt;
                    &amp;lt;div class="panel-element-row"&amp;gt;
                      &amp;lt;div id="element2" class="dashboard-element table" style="width: 100%"&amp;gt;
                            &amp;lt;div class="panel-body"&amp;gt;&amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;

    &amp;lt;/div&amp;gt;


            &amp;lt;div id="panel4" class="dashboard-cell" style="width:60%"&amp;gt;
                &amp;lt;div class="dashboard-panel clearfix"&amp;gt;
                    &amp;lt;h2 class="panel-title"&amp;gt;&amp;lt;/h2&amp;gt;

                    &amp;lt;div class="panel-element-row"&amp;gt;
                        &amp;lt;div id="element4" class="dashboard-element table" style="width: 100%"&amp;gt;
                            &amp;lt;div class="panel-body"&amp;gt;&amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
            &amp;lt;div id="panel5" class="dashboard-cell" style="width: 40%"&amp;gt;
                &amp;lt;div class="dashboard-panel clearfix"&amp;gt;
                    &amp;lt;h2 class="panel-title"&amp;gt;&amp;lt;/h2&amp;gt;
                    &amp;lt;div class="panel-element-row"&amp;gt;
                         &amp;lt;div id="element5" class="dashboard-element table" style="width: 100%"&amp;gt;
                            &amp;lt;div class="panel-body"&amp;gt;&amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;

    &amp;lt;/div&amp;gt;

    &amp;lt;/div&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Java script :&lt;/P&gt;

&lt;P&gt;html2canvas(document.getElementById("all"), {&lt;BR /&gt;
             onrendered: function(canvas) {&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;             var imgData = canvas.toDataURL('image/png');
          //   console.log('Report Image URL: '+imgData);
             var doc = new jsPDF(); //210mm wide and 297mm high

             doc.addImage(imgData, 'PNG', 10, 10);
             doc.save('sample.pdf');
         }
     });
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Aug 2017 14:44:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333615#M21636</guid>
      <dc:creator>Kimosoft2</dc:creator>
      <dc:date>2017-08-01T14:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert dashboard to HTML Export using jsPDF?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333616#M21637</link>
      <description>&lt;P&gt;Cool thank you very much !&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 09:03:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333616#M21637</guid>
      <dc:creator>baigura</dc:creator>
      <dc:date>2017-08-03T09:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert dashboard to HTML Export using jsPDF?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333617#M21638</link>
      <description>&lt;P&gt;Hi Baigura/Kimosoft2,&lt;BR /&gt;
I am new to splunk and sorry for asking my question in this old post. Currently I am working on requirement to add the dashboard content within email body itself as an image instead of pdf attachment. Does the java script &amp;amp; HTML code mentioned here is for the same purpose? If so, how can I implement this in splunk.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 13:35:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-dashboard-to-HTML-Export-using-jsPDF/m-p/333617#M21638</guid>
      <dc:creator>poddraj</dc:creator>
      <dc:date>2020-01-08T13:35:20Z</dc:date>
    </item>
  </channel>
</rss>

