Page 1 of 1

COM Interface for Print Job Status

Posted: Sat Mar 03, 2007 3:05 am
by fgump
Is there anyway with the latest version of BullZIP PDF Printer to detect when a print job has started and ended? I would like to use this from my program to print documents (text files, Word documents, etc...) to PDF files one-at-a-time. I need to know when the print job starts and ends. I couldn't see this anywhere in the BullZIP object when I defined it in Visual Basic.

If this is not available, will this possibly be implemented in the near future?

Thank you very much,

Frank

End of Print Job

Posted: Mon Mar 19, 2007 5:27 pm
by YVESZAJ
I am also very interested to know when the PDF file is created, completed and closed, because I need to automatically send it by mail, and also to merge other PDF in it.

It seems that the AfterPrintProgram parameter dos not exists anymore in version 3.

I dont know if the print driver writes directly in the output PDF File, or in a temp file which is then renamed. In the first case, I cannot open the file until it is closed. In the second this case, I can test if the file exist.

Sincerelly,

Yves

Posted: Wed Apr 25, 2007 2:24 pm
by shiram
I would also like to know this. The print driver writes directly to the output PDF File. Is there a way to check when writing is done or wil there be one in the future?

I tried checking the printer queue, but the file is still in use after it is removed from the queue.

Regards,
Carl

When a file is done printing

Posted: Wed Jun 13, 2007 7:21 pm
by Pliny
In Visual Basic 6.0, which is what I use, I use FileSystemObject FileExists for this.

Dim fso as new FileSystemObject

do until fso.FileExists("myfile.pdf")
loop

This holds the program in a loop until the file is written. If you like, a message box can come after that stating that the file has been written.

Pliny

Re: When a file is done printing

Posted: Sat Aug 11, 2007 3:09 am
by mike_ottum
[quote="Pliny"]In Visual Basic 6.0, which is what I use, I use FileSystemObject FileExists for this.

Dim fso as new FileSystemObject

do until fso.FileExists("myfile.pdf")
loop

This holds the program in a loop until the file is written. If you like, a message box can come after that stating that the file has been written.

Pliny[/quote]

This method is not guaranteed to tell you when PDF Printer has finished. It could create the file and still be in the process of writing to it, but FileExists will return true.

A better method is to first check for file existence using the quoted method and then check to see if you can open the file for appending. Once you can open for appending, you know that PDF Printer has closed the file, because otherwise you would get a sharing violation.