Problem with Printer Controller Extender and Some Drivers
Keywords: Printer Controller Extender Drivers
I am busy creating a little utility that will allow users to see a list of all printers per location and then install
the correct version of the driver with all the correct settings. I could do the installation bit previously, and
when I read about the new extender and saw what it is supposed to do, i was obviously pleased. Problem
is that I cannot change the printer attributes to what I want.
Basically I am trying to use the pSetPrtAttrib command to change the default paper size of a printer (to
A4), configure the duplex unit, set the default tray etcetera. It gives a return code 1 which indicates that
everything worked OK, but when I go to the printer driver, it still has the old settings. Then I went on and
changed the settings in the driver manually and used pSetAttrib to change the settings back to the default
settings, and that worked fine.
Just one additional thing - when I query the printer settings after I atempted to change the paper size from
Letter to A4, and I do a pGetPrtAttrib for the paper size, I get a code of -22476 returned
Make sure the parameters are correct. Set it manually the way you want,
then do a pGetPrtAttrib on each of the attributes you want to change, and
use those values for pSetPrtAttrib. The values may vary from one printer
driver to another.
Ok - I have something more that might help. I have tested with an IBM 4039 16 Driver as well as with
HP Laserjet drivers. It works fine with those drivers. The drivers I have experienced a problem with is the
newer generation PCL drivers from IBM. What I found further is that if I go in manually to change the
printersīs settings in the driver, and afterwards try change it with the pSetPrtAttrib command, it works
So in brief again -
Utility installs driver, tries to do settings
I hope that will help some. Would it help if I e-mail a copy of the drivers on to you?
- Comes back with return code 1
- Check settings - nothing changed
- Do pGetPrtAttrib, gives me a minus value
- Go to driver manually change settings to anything else
- Do pSetAttrib
- Changes take place without a problem.
- pGetPrtAttrib returns the correct value.
I'm not sure. It seems that some particular print driver wants to be opened from the Printers applet to do
some special initialization before it works properly.
Is that what you see? After installing the printer driver you *have* to open the printer applet only once,
and then after that everything works fine?
You could try to run the printer applet and then close it and see if that is sufficient to make it happy.
Should be simple to do in a script.
Article ID: W12548
Filename: Prob with Printer Extender and Some Drivers.txt
File Created: 2017:07:28:12:58:38
Last Updated: 1999:05:21:07:45:32