I'm developing a web application that needs to support printing on various
pages. I'm using css with media="print" statements to format the page, and
this is working well. The issue I'm having is that the page isn't being
reloaded after it is resized as a part of the internal printing process. Or
in other words, the CSS changes are being applied to the printed version of
the page without the browser reloading the page elements. I need the page
elements (images, etc) to be reloaded so that they can be rendered at the
correct size for the printed page.
I believe that not reloading the page as a part of the print process is
typically desirable -- I wouldn't something to reload and break (like a page
that requires certain form input). But in my case resizing the page without
reloading it won't work as the images I've rendered for the on-screen page
will be cut off or too small.
I've tried using the onbeforeprint and onafterprint client side events to
resize/reload the page, but these changes seem to be ignored as a part of
the CSS print rendering process.
As a workaround to this I can add a link or button on my page that pops up a
page for printing, but it would have to be formatted for a certain size
page. One of the advantages of using the CSS for printing is that with
elements set to percentage sizing my page (which is again a web application)
I can take advantage of any available page size.
Does anyone have any insight into how I can force the print process to
reload a page once it re-renders it for printing? Or some other idea?
Thanks,
Jeff
|