0

I am creating a graphic to be dynamically generated for a report for one of our clients. I have the rough layout and I am testing to see how it prints. However, when I go to print it/save to pdf (testing both), the stylized divs are not being displayed.

Html Generate Screen

enter image description here

Print/Pdf Page

enter image description here

Alex
  • 8,461
  • 6
  • 37
  • 49
coding
  • 71
  • 2
  • 10

1 Answers1

0

CSS styling for printing is very limited. With more complex layout like yours, you're either better of converting it to an image or converting it to a PDF file. Choosing the best framework really depends on what back-end you're using. In Java I had most of luck using FlyingSaucer and in PHP html2pdf.

Also, this is good tutorial on what is possible using CSS styling for printing.

Community
  • 1
  • 1
Tim
  • 5,521
  • 8
  • 36
  • 69