[Migrated content. Thread originally posted on 19 April 2009]
We use the CutePDF writer.When a print file is closed the pdf file name created depends on registry entries that specify either
A) ask the user to specify the location of the print file with a save-as dialogue box
or
B) where to place the print file with a filename programatically set with registry values.
We have recently noticed that after a print file is closed, there seems to be a varying delay before the cutepdf driver seems to know that the print file has been closed.
For instance, we would set the output filename to c:\\temp\\output.pdf and to inhibit the save-as dialogue box, write the report, close the print file and then reset the registry entries to activate the save-as dialogue box true and have no file name specified (ready for the next report). Sometimes it seems that the pdf driver does not read the registry before it has been reset by our program AFTER the print file was closed, (i.e. it loses the bypass filename) and it then displays the save-as dialogue box.
I have found that using c$sleep for 3-5 seconds stops the problem and allows enough time between the close of the print file and the re-setting of the registry entries to allow the pdf driver to store the report where required. But this is not really a good solution.
Is there any way to ensure that the print file CLOSE statement affects the pdf driver more quickly or is there a way to wait for that event to have occurred?
We run version 7.2 under Windows XP most of the time.



