How do I tell the printer to spawn an application

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
Mike.B
Posts: 7
Joined: Fri Nov 10 2006
Contact:

How do I tell the printer to spawn an application

Post by Mike.B »

We currently allow people to turn the printer on or off via the tray icon (on start application call PDFDriverInit and on exit the printer is cleaned up).

We are porting the application to Limited User and Vista environments so now the printer is installed with install.exe and then later the app calls DriverInit and EnablePrinter.

Now the printer is in the Printers list from the time it is originally installed. When the application is not running it rightfully complains that the printer is not activated.

My question is the following:
is there a way to tell the printer to start an application that will subscribe to its events and do the enabling code?

better yet is there a way to disable the printer until someone calls the DriverInit+EnablePrinter?

NOTE: installing printer at the start of the application with PDFDriverInit is not an option because the whole point of this release is to support Non-Admin users and to avoid popping up UAC dialogs on Vista.

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

Post by Joan »

Hello,

You said: "When the application is not running it rightfully complains that the printer is not activated. "

Does it complain if you try printing to it from Windows application on your system other than your application that integrates the Converter?

Doe is complain in any other sistuation?

If you have the Developer version of the PDF Converter integrated in an application, it is normal that if you try to print to it from any other application like MS Word or Excel lets say it will generate an activation error message.

Developers versions of the PDF Converter can be used only programatically from inside your application.

If you give the printer a specific name to your application (by example <My Application Export>) users will not be tempted to use it and print to it.

Hope this helps.
Mike.B
Posts: 7
Joined: Fri Nov 10 2006
Contact:

more detailed steps

Post by Mike.B »

Here are the more detailed steps of my use case:

case 1 (good)
  • install -s "DocuSign Professional" // printer installed
    start the tray application that initializes the printer
    launch FireFox and print any page
    RESULT: all is good the application gets the converted PDF files.
case 2 (bad)
  • install -s "DocuSign Professional" // printer installed
    // do not start the application or shut it down
    launch FireFox and print any page
    RESULT:

    Code: Select all

    ---------------------------
    Activation Error
    ---------------------------
    Printer not activated, error code -30
    ---------------------------
    OK   
    ---------------------------
    
Basically the printer is in the printer list, BUT nothing has initialized it.

Can I pass anything to the install so that printer is installed but doesn't show up in the list unless something is subscribed to it?

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

Post by Joan »

Hello,

There is no way to run Install.exe and install the printer in an invisible way.
You can either have the printer installed or not.
You can however either always run the tray application directly after running Install.exe or run Install.exe from the command prompt with the activation code and license to information
To do that you can call:
Install "PDF Printer" -n "LicenseTo" -c "Activation Code"

Hope this helps.
Mike.B
Posts: 7
Joined: Fri Nov 10 2006
Contact:

Thanks!

Post by Mike.B »

Joan, thanks for your reply. The issue that I am trying to tackle is having a printer installed while no application is running to capture the events.

With the current design essentially requires that the application subscribing to the printing events and activating the printer is running all the time. So if someone shuts it down (or it shuts down on it's own) the printer seizes to be functional.

Is this a design consideration that you guys have for future versions? Currently in order to have a robust system the activation process needs to be a Windows Service.
Post Reply