2.50g Error code -40 printer not activated

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
wavemachine
Posts: 10
Joined: Mon Apr 10 2006

2.50g Error code -40 printer not activated

Post by wavemachine »

We are occasionally getting an Error code -40 Printer not activated when attempting to print to PDF using our application.

Once this error has occured then the only way we seem to be able to overcome it is to reinstall the Amyuni driver, a system reboot results in the same error.

We are using Visual Studio 2005 and the code that is failing is written in C# using dotnet framework 1.1

basically the code is doing this:-

Code: Select all

IntPtr converter;
converter = DriverInit("Digita PDF Converter");
if( converter )
{
  if( EnablePrinter(converter, "Our Name", "Our License Key" )
  {
    SetDefaultPrinter(converter);
    SetDefaultFileName(converter, filename);
    SetFileNameOptions(converter, 0x8000003);

    // Do the print job

    RestoreDefaultPrinter(converter);
    SetFileNameOptions(converter, 0);
    DriverEnd(converter);
    converter = IntPtr.Zero;
  }
}
Any ideas please as this is causing problems for both us internally and our customers.

Thanks
wavemachine
Posts: 10
Joined: Mon Apr 10 2006

Post by wavemachine »

Think I have solved the problem, the license key the app was passing was for the 2.1 driver and not 2.50g.
Post Reply