exception thrown driverinit failed

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
Kees van Spelde
Posts: 4
Joined: Fri Nov 14 2003
Location: Tilburg, Netherlands
Contact:

exception thrown driverinit failed

Post by Kees van Spelde » Fri May 04 2007

when using the following lines of code :

Code: Select all

const string PDFprinter = "PDF Compatible Printer Driver";
const string strLicenseTo = "MyCompany";
const string strActivationCode = "MySerial";
CDIntfEx.CDIntfEx PDF = new CDIntfEx.CDIntfExClass();
PDF.DriverInit(PDFprinter); 
i get a driverinit failed exception, and evaluation PDF.GetLastErrorMsg() results in "The printer name is invalid.\r\n"


i tried the printer names supplied on the forum, but al result in the same error.

We have an installation of the Amyuni PDF printer installed, and it is working.

Could anybody tell me what i am doing wrong ??

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Mon May 07 2007

Hello,

The printer name should be the same name of the printer installed on your system.

DriverInit will check if the printer given to it is intalled on the system, if it is it will attach to it.

So you need to have the printer installed on the system before using DriverInit.

Hope this helps.

Kees van Spelde
Posts: 4
Joined: Fri Nov 14 2003
Location: Tilburg, Netherlands
Contact:

Post by Kees van Spelde » Mon May 07 2007

thanks for your reply.

this indeed did the trick for me.

Post Reply