function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

I have page with horizontally scrollable when am printing its not printing the hole page(div) content. Its printing only the part which appearing on the screen. If anyone have the solution for this plz replay to this

Thanks in Advance

Are you using browser print option or any custom button you implemented on the page? If you are using browser print button, you will get what you see on the screen.

Please try using a custom button as per the example given in the below article.
Ankit AroraAnkit Arora
Can you provide the code which prints the page?
Thanks ramu,
 i used window.print() method only but am facing the problem i that only.

Hi ankit.

 Actually am using google virtualization chart  to diplay organization hierarchy. But that char generating horizantally so when am printing using window.print() method  am getting hole content just getting left portion of the page only.

Hi Rajkamal, see if this article helps where they used a styling in div attribute to set the page print orientation to landscape mode rather than a default portrait mode. See if this works
Hi Ramu i have tired this already but same result thats becauese the page nearly 3000px wide.

Finally i switched to iframe insted of div so i can take print of portion which i want by scrolling but that idea working in chrome only  not in other browsers.
Thank you for your valuable time Ramu.

 Google api uses canave technology to create it's own dom element  for creating the chart so we can't renderas PDF  directly from the browser now.

 When i try to do that i got blank PDF page sometime script code in that page.

 Try the bellow code with and without renderAs PDF

 <apex:page renderAs="pdf" >

  <script type="text/javascript" src=""></script>

  <script type="text/javascript">
    google.load("visualization", '1', {packages:['corechart']});
    function drawChart() {

      var data = google.visualization.arrayToDataTable([
        ['Element', 'Density', { role: 'style' }],
        ['Copper', 8.94, '#b87333', ],
        ['Silver', 10.49, 'silver'],
        ['Gold', 19.30, 'gold'],
        ['Platinum', 21.45, 'color: #e5e4e2' ]

      var options = {
        title: "Density of Precious Metals, in g/cm^3",
        bar: {groupWidth: '95%'},
        legend: 'none',

      var chart_div = document.getElementById('chart_div');
      var chart = new google.visualization.ColumnChart(chart_div);

      // Wait for the chart to finish drawing before calling the getImageURI() method., 'ready', function () {
        chart_div.innerHTML = '<img src="' + chart.getImageURI() + '">';

      chart.draw(data, options);
    document.getElementById('png').outerHTML = '<a href="' + chart.getImageURI() + '">Printable version</a>';

<div id='chart_div'></div>