2

I am creating a dynamic dashboard using Vf Charts. I am having about 18 different charts on a single visual force page. I have added a print button on the visualforce page to print all the charts on single page. On click of button I am using

<apex:commandButton value="Print"   onclick="window.print();" /> 

But when i click on print all charts are not on a single page.

Is their any easy way so that I can get print of all the charts in one single page?

  • can you add a screenshot? – PepeFloyd Oct 16 '14 at 13:15
  • 1
    If you're trying to print a hard copy, whether they'll print on a single page will depend entirely on the printer you're using and printer set-up settings for your browser. If using chrome for example and you have the browser set to zoom, the printer output will also zoom; same for another page from the same site. – crmprogdev Oct 16 '14 at 13:21
  • 1
    You could use a @media (print) CSS modifier to adjust the size of the elements, remove unnecessary borders, etc, to try and get the content to fit on one page, as well. – sfdcfox Oct 16 '14 at 13:35
  • I have tried for @media print { body{zoom: 0.7; /* IE / -moz-transform: scale(0.65); / Firefox / -o-transform: scale(0.7); / Opera / -webkit-transform: scale(0.7); / Safari And Chrome / transform: scale(0.7); / Standard Property */}} With this css it is working fine for chrome and I am getting all data in one single page but when I tried to take print in Mozilla and I.E my charts are getting break from middle and half of the print is displayed on another page even If their is lots of place on first page. – Swapnil Kale Oct 16 '14 at 13:51

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.