I am facing a challenge with my ASP.NET page that uses jqPlot to dynamically generate varying numbers of graphs on the client side. I am looking for a way to print out just these generated graphs without including any unnecessary elements.
Although I am not familiar with preparing web pages for printing, I have come across two possible approaches:
- Utilize CSS with media="print" to hide unwanted elements.
- Use JavaScript to open a new window and pass the content to be printed. This method may involve passing all the necessary objects for graph generation in jqPlot and re-rendering the graphs.
Since the graphs are created on the client side, traditional ASP.NET server-side printing techniques are not applicable. The second approach seems complex and excessive, so I am leaning towards the CSS method at the moment.
I would appreciate hearing how others have addressed similar challenges.