Knowledgebase: Developer
Detecting when Win2PDF has finished
Posted by admin admin on 22 November 2006 09:27 PM

Is there a way in which we could tell when Win2PDF has finished printing?

If you use the PDFPostFileName registry setting to specify the file name instead of PDFFileName, you can check for the existance of the registry value to determine when Win2PDF has completed processing the PDF file. PDFPostFileName works just like PDFFileName, but the value isn't deleted until processing has been completed. A VB example showing how to poll for the existance of PDFPostFileName after printing to the Win2PDF printer is below.

Under general declarations:

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

'set file name in registry
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFPostFileName", "c:\\customer_number.pdf"
'print to Win2PDF
'Verify Win2PDF is done creating PDF file
Sleep 10
PDFRegKey = GetSetting("Dane Prairie Systems", "Win2PDF", "PDFPostFileName", "")
Loop While PDFRegKey <> Empty
(1 vote(s))
Not helpful

Comments (0)

Copyright 2000-2018 © Dane Prairie Systems LLC. All Rights Reserved. About Us | Privacy Policy | PDF Blog | Site Map