0

I need to print a diagram from Javascript to printer. The diagram is a HTML page, that is being created on-the-fly in JS. I've checked some methods, like the printout from the browser, also print to PDF with CutePDFWriter, but the results were poor. The legend and calendar were printed, but the content/bars weren't. Each gradiented bar on the image is abount 20 DIV's with different colour. They are not being printed. The diagram can be quite big (several screens scrolled).

Click here to see the diagram

The printout needs to go to a printer. But it could also go through a PDF, or even an image, that will be saved and printed later. The issue is, that it must be done through Javascript, with no server support (as the whole thing goes only with HTML+JS+CSS). Any ideas?

sincerely, Mateusz

Mateusz Moroz
  • 312
  • 2
  • 6
  • 19
  • After the HTML page is rendered to the browser why does File | Print not work? – Sukima Nov 12 '13 at 16:11
  • Hard to say. The diagram after print looks like this: http://pl.tinypic.com/view.php?pic=msfvdk&s=5#.UoNG2fkz3rg – Mateusz Moroz Nov 13 '13 at 09:32
  • Best guess: the elements that aren't printed use background color or background image. See http://stackoverflow.com/questions/18121696/dynamically-created-element-not-appearing-when-page-is-printed – JJJ Nov 14 '13 at 09:44
  • That's right, the background is the problem. I'll try to rewrite the page before printout. Thanks. – Mateusz Moroz Nov 14 '13 at 10:30

0 Answers0