I am want to print calendar page as pdf .so i use this module,,but i have error with my calendar css didn't appear any way in the pdf ,,can any one advice me what should i do???i use tcpdf library...

Comments

bygeoffthompson’s picture

Similar to the original issue I am attempting to build printer-friendly pages (using this module, duh) for a D7 website with fullcalendar.io integrated.

Using a custom print template and defined stylesheet everything looks great... until I attempt to print. While the browser window's calendar accepts my print.css styling rules the print preview strips out my rules targeting specific parts of the calendar (for example, color-coding different events). Basically the print page looks exactly as it should when first loaded (print/user/[UID]) but the styles do not successfully make it to the print preview, nor the printer.

Anyone else experience an issue like this? Anyone have any insight? Thanks!

** Update **

After further investigation I was able to determine that several global (*) styles coming from my framework, wrapped in a @media print, were clearing all my calendar colors. Rather than write targeted rules to combat this I ended up disabling the CSS being defined by my print template and just called the three sheets I need to style the print page and Webkit's print preview.