I have multiple applications ...

This is a read only forum. It contains the most frequently asked questions about Amyuni products and licensing.
Post Reply
Dany
Amyuni Team
Posts: 113
Joined: Wed Sep 11 2002
Location: Montreal.
Contact:

I have multiple applications ...

Post by Dany » Fri Aug 05 2005

printing to the PDF Printer in the same time. What can I do to avoid conflicts?

Since version 2.06, we have a locking mechanism that enables you to print to the PDF Printer programmatically in multithreaded environment.
The lock works as follows:

- To lock the print job:
cdintf.Lock( documentTitle );
the document title is what appears in the printer spooler when a document is printed,
Ex: for Excel object, it’s the Workbook.Name.

- To set the output file name:
cdintf. SetDocFileProps(documentTitle, fileNameOptions, fileDir, fileName);
or to email the document:
cdintf.SetDocEmailProps(documentTitle, To, CC, BCC, Subject, Message, Prompt)

- Do the printing

- To unlock:
cdintf.Unlock( documentTitle, timeout );
It waits for the print job to start or the timeout event whichever comes first and then unlocks the job.

You need to know the document title as it appears in the print spooler to be able to use this method.

Post Reply