I'm working on a report that can have over 100 JavaScript generated graphs on it and in order to reduce the time it takes for the page to render the first time I set it up to create the graphs when they're scrolled to. It turns out that this doesn't work to well when you try to print the report (I'm not sure how that will be helpful) so I had to figure out how to generate the graphs before the user attempts to print the report.

Stack Overflow had the answer for me:

http://stackoverflow.com/a/11060206/4437

It still takes a little while to generate the print out but it's a lot easier to work with.

I think this would work well with lazy loaded images as well.