First printer initialization fails after updating to 2.5

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
trumpetinc
Posts: 60
Joined: Mon Jul 28 2003

First printer initialization fails after updating to 2.5

Post by trumpetinc »

This is a tough problem to test, but here's what's happening:

From a clean workstation, we install our application with the 2.1 driver
We then upgrade to the 2.5 driver (basically, we close our app, call PDFDriverInit, then DriverInit(), then DriverEnd() ).

The next time our application runs, it called DriverInit, and registers itself to receive driver events.

We print to the driver and receive the DOCUMENTEVENT_ENABLEDPRE event. We call EnablePrinter, then return 0x1 from the event handler.

At this point, the application sending the print job (we are just testing with Notepad for the time being) comes back with a message that says "Device is not ready".

If we close the app and restart, then everything works perfectly from that point forward.


In order to get the problem to happen again, we have to delete the printer and delete the pdfui250.dll and acpdf250.dll files from the C:\windows\system32\spool\drivers\w32x86 directory, then install the 2.1 drivers, then repeat the update procedure.



What's going on here? Is something from the 2.1 print driver still hanging around until EnablePrinter is called? Should I be calling this during our installation procedure?


Before any asks, running with install.exe is not an acceptable solution. It does not provide nearly enough status responses to the calling application to ensure that we can provide meaningful error messages.


Thanks in advance!

- Kevin

PS - What do you all think about sharing the source for install.exe? That would help those of us who can't use it as an external application so we can be sure we are following the correct procedure...
trumpetinc
Posts: 60
Joined: Mon Jul 28 2003

Re: First printer initialization fails after updating to 2.5

Post by trumpetinc »

For anyone who cares, it was necessary to call EnablePrinter() after calling DriverInit(). This was not necessary in 2.1, but is in 2.5.

- K

trumpetinc wrote:This is a tough problem to test, but here's what's happening:

From a clean workstation, we install our application with the 2.1 driver
We then upgrade to the 2.5 driver (basically, we close our app, call PDFDriverInit, then DriverInit(), then DriverEnd() ).

The next time our application runs, it called DriverInit, and registers itself to receive driver events.

We print to the driver and receive the DOCUMENTEVENT_ENABLEDPRE event. We call EnablePrinter, then return 0x1 from the event handler.

At this point, the application sending the print job (we are just testing with Notepad for the time being) comes back with a message that says "Device is not ready".

If we close the app and restart, then everything works perfectly from that point forward.


In order to get the problem to happen again, we have to delete the printer and delete the pdfui250.dll and acpdf250.dll files from the C:\windows\system32\spool\drivers\w32x86 directory, then install the 2.1 drivers, then repeat the update procedure.



What's going on here? Is something from the 2.1 print driver still hanging around until EnablePrinter is called? Should I be calling this during our installation procedure?


Before any asks, running with install.exe is not an acceptable solution. It does not provide nearly enough status responses to the calling application to ensure that we can provide meaningful error messages.


Thanks in advance!

- Kevin

PS - What do you all think about sharing the source for install.exe? That would help those of us who can't use it as an external application so we can be sure we are following the correct procedure...
Post Reply