Click to See Complete Forum and Search --> : can't stop swap file growing when printing with win32 PRINTDLG....


September 27th, 1999, 10:38 AM
Scenario:
I have an applet which generates several pages of text/images using purely the graphics object. I also use the MediaTracker object to ensure images are loaded before adding it to the page(s). Finally, I print these documents using the PrintJob object and with the win32 PRINTDLG object (ie. from com.ms.win32 package - which invokes the familiar windows print dialog).

Everytime I print a set of these documents (8 pages), the local swap file increases by roughly 60MB! Viewing these documents only uses the physical memory in the system and these resources are properly released after viewing has ended.

Has anyone experienced similar memory problems when printing things created by the graphics object using the native win32 PRINTDLG object? Is there a way to 'free' up the resources (ie. swap file) back to the original state after printing is done?

In the meantime I am going to try implementing finalize() and calling them explicitly after printing to see if this helps.

Any help is much appreciated! Thanks!

October 6th, 1999, 01:00 AM
I don't have a solution for you, but I was wondering if you could e-mail me a snippet of your code that does the actual printing for Windows. My e-mail is jbarziza@airmail.net. Thanks.