Problems when moree Jobs prints on Terminal server

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
Posts: 1
Joined: Tue Sep 07 2010

Problems when moree Jobs prints on Terminal server

Post by idaraio » Wed Sep 08 2010

We have some problems about PDF converter used on a multi-process system (with terminal services).
We use PDF Converter 3.03 Developer version on a Windows 2003/2008 system with Terminal services.
The printer "Sistemi PDF Generator 3.03" is installed as a persistent printer on the server.
Our programs initialize its use by DriverInit function.

Then, they use the Lock function in order to avoid conflicts, and sets the
destination PDF file name with SetDocFileProps function (PDF_NOPROMPT +
PDF_USEFILENAME options are set).
At the end of this e-mail, i attached the code.

When multiple users are connected to the server (many Terminal Server
sessions), all of them use the same device "Sistemi PDF Generator 3.03" to
print to PDF file.
If one of the printing job takes a long time to be completed (i.e with 1000
pages), all the other printing jobs wait for its terminatation.
So, the other clients seems to hang up, like there was some problems with
the program.
I can send the printer queue status as an image.

Is there any way to avoid this waiting time?
When a program prints to a "normal" printing driver, all the jobs are queued
without waiting the othera to finish.
Thank you very much for any suggestion.

Code sample:

if (bAppend)
if (nPDFAVersion > 0)
nOptions += 0x200000; // standard
nOptions += 0x400000; // licenziati
nOptions += 0x1000000; // font simulation
nOptions += PDF303_MULTILINGUAL_SUPPORT; // serve perche'
altrimenti non include bene gli zz*.ttf
int nImageOptions = PDF300_IO_NODUPLICATES; // consente di non
duplicare le immagini
if ( nPDFAVersion > 0)
nImageOptions += PDF303_IO_XMPMETADATA; // PRO PDF/A - 1b
nImageOptions += PDF303_IO_OUTPUTPDFA8;
(* m_SetImageOptions) (m_hPDFPrinter, nImageOptions);
(* m_SetDefaultConfigEx) (m_hPDFPrinter); // cosi' solo per il mio

if (s_nPDFUsing300 > 0 && pszPgmTitle && pszPgmTitle [0])
CString sLockKey;
GetLockKey (sLockKey, pszPgmTitle);

int rResLock = (* m_Lock) (m_hPDFPrinter, sLockKey);
int nRes = (* m_SetDocFileProps) (m_hPDFPrinter, sLockKey, nOptions,
_T(""), m_szPDFFileName);

Post Reply