PDF Creator Dev with Win 2012R2 RDS 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
Wolfram Ansin
Posts: 2
Joined: Fri Jul 10 2015

PDF Creator Dev with Win 2012R2 RDS Terminal Server

Post by Wolfram Ansin »

Dear Support,
we want to use PDF Converter Dev Edition to create PDFs from Navision. I tried the eval-Version with success.
Our customer is running Navision (2009R2, Classic Client) on Terminals Servers on Windows 2012R2 with about 20 Users per Server.
I will install the PDF Converter Driver as a regular Printer on all Terminalservers (and can use it only to generate PDFs from Navision).
The users generate many PDFs the whole day to send them by email.
  • What must I do to prevent the users are getting wrong PDFs?
  • Must I use the Lock-Command? Does the Lock-Command cause a delay for other users if they want to generate a PDF at the same time?
  • If a user generate a PDF from Navision and prints another document at the same time from an other application like Word to the standard printer, is it possible the user prints to amyuni PDF-driver instead of the regular printer?
  • What happens if Navision shows an error and as a result the Command RestoreDefaultPrinter is not executed?
I know, many questions. At the moment we have the problem, sometimes the users get a wrong PDF (or no PDF), and we are looking for a way to solve this problem.

My code (at the moment):

Code: Select all

autPDFo.DriverInit('NAV-PDF-Printer'); // Printer is installed
autPDFo.Lock('NAV-PDF-Printer');
autPDFo.EnablePrinter('Amyuni PDF Converter Evaluation', 'verylongkey');
autPDFo.FileNameOptions(1 + 2); //1 = no promt, 2 = use default filename
autPDFo.DefaultDirectory('c:\Temp');
autPDFo.SetDefaultPrinter();
autPDFo.DefaultFileName('u:\Temp\TestPDF-OCX.pdf'); // Save to users home drive

... select the thing I want to print and print the report ...

autPDFo.FileNameOptions(0);
autPDFo.RestoreDefaultPrinter();
Do I need a DriverEnd() as the last command?

Thanks for your help in advance.
Best regards,
Wolfram A.
Wolfram Ansin
Posts: 2
Joined: Fri Jul 10 2015

Re: PDF Creator Dev with Win 2012R2 RDS Terminal Server

Post by Wolfram Ansin »

OK, I was thinking about locking and have read the documentation now.
Lock() is not possible for me as I don't know the document name wich is shown in the printer driver window when printing any report from Navision. (I know it would be possible with many hours of programing, but if 2 users on the terminal server print e.g. an invoice, the document name is the same).
GLock() would be nice, but I can't reboot a terminalserver if the program (Navision) crashes.
So I decided to set all needed settings and use the command SetPrinterConfig(1), so my settings are stored only for the current user.After storing the settings I immediately start the report with printing.

My questions:
Does your driver matters if, after starting a print, the settings (from a different therad/program) are changed (and stored by SetPrinterConfig(1) in the registry)?
Any other hints to prevent creating wrong PDFs from 2 programs/instances from the same user or from 2 different users using the same program at a terminal server?

Thanks for your help,
Wolfram
Best regards,
Wolfram A.
Post Reply