'Output File Name' dialog for W2008 64-bit 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: Wed Feb 04 2009

'Output File Name' dialog for W2008 64-bit terminal server

Post by tlam » Wed Apr 11 2012

We have a 32-bit application using PDF Converter v4.5.1.0 to convert Word/RTF files to PDF and it works fine on 32-bit systems.

But terminal server users on a Windows Server 2008 64-bit SP2 machine get the 'Output File Name' dialog when our application tries to print despite using the NoPrompt option. If they click continue, the pdf is created but we don't want the dialog displayed plus it messes up the filename by prefixing 'Microsoft Word VIewer' onto the filename and truncating the unique ID number we assigned it. This happens even for a user logged in as an administrator but not for non-terminal server users.

We are using the Lock function in conjunction with setting Windows Explorer to show file extensions. This is because another customer using Windows 2008 64-bit (but R2 this time) had terminal server users occasionally getting documents printed by other users and this fix ensures users get their own documents. But it doesn't work for the other customer.

Is there anything else I can try? Could it be compatibility with other applications like Adobe Reader?

Posts: 76
Joined: Thu Jun 16 2011

Re: 'Output File Name' dialog for W2008 64-bit terminal server

Post by Rich » Thu Apr 12 2012

The issue you are describing is occurring because the document title you are passing the Lock() function is incorrect.

The Lock() function requires the developer to pass the function the document title that is going to be printed. This is same document title that will appear in the print spooler. When implementing the Locking mechanism one way to quickly check how your printing application is generating document titles is to first pause the PDF Converter and then print to it. In the print spooler you will see the document name to use.

The CDIntf library uses the registry to interact with the printer drivers. When the Lock function is used, the output file name and options are set using the SetDocFileProps function and not from the SetDefaultFileName and SetFileNameOptions functions which manipulate registry entries that are common to all users. The Lock function works by locking the process based on the document name used in the print spooler. You can pause the printer spooler and check that the document name you are passing the lock function is the correct document name. The Unlock function is used after printing has ended to make sure another printout can start. The call to Unlock is needed only in the case where an error occurs; the printer will otherwise call Unlock internally as soon as printing starts to allow another printout to occur in parallel. The Timeout value represents the Timeout in milliseconds after which the function returns.

I have included below a link to our online documentation which explains this in greater detail.
https://www.amyuni.com/WebHelp/Amyuni_D ... s/Lock.htm
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com

Post Reply