COM Interface for Print Job Status

About the programming interface for the virtual PDF printer driver.

Moderator: jr

Post Reply
fgump
Posts: 4
Joined: Fri Mar 02, 2007 6:31 pm

COM Interface for Print Job Status

Post 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
YVESZAJ
Posts: 1
Joined: Mon Mar 19, 2007 5:17 pm

End of Print Job

Post 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
shiram
Posts: 1
Joined: Mon Apr 23, 2007 1:00 pm

Post 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
Pliny
Posts: 5
Joined: Tue Jun 12, 2007 11:12 pm

When a file is done printing

Post 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
mike_ottum
Posts: 3
Joined: Sat Aug 11, 2007 3:02 am

Re: When a file is done printing

Post 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.
Post Reply