The Problem with UniversalDD.Run
Calling &GETGPSDEVICECONFIG returns a ERC 0 (zero), and a 0
for DeviceConfig-Orients.
Traditionally, and documented behavior, was that &GETGPSDEVICECONFIG
would return value of:
1 - for one orientation (ie. Dot Matrix printer).
2 - for two orientations (ie. Laser Printer).
Now a 0 is returned when UniversalDD.Run is used.
I found a reference to the behaviour in the CTOS Desktop Plus Print
Services 2 SRA:
"The Universal Device Driver passes through print job
information as a binary stream and thus, is not considered a graphics driver
to some applications using GPS."
&
"The only status messages available to CTOS applications from
Print Services include idle, printing or paused. All other status
messages are not available."
In other words, UniversalDD.Run returns little information of value to a GPAM call.
Workaround?
What I do, is (in Cobol):
IF UNKNOWN-PRINTER-TYPE
MOVE 2 TO DeviceConfig-Orients
DeviceConfig-DevOrient
END-IF.
UNKNOWN-PRINTER-TYPE is defined as having a value of ZERO.
The observant reader will note that I set DeviceConfig-Orients/DeviceConfig-DevOrient
to 2. The assumptions behind this are:
1. not many people use a dot matrix printer in Windows.
2. the reports I will be printing will be 132 characters wide (at
least) and hence need to be set to landscape.
Disclaimer
This article is provided as is without any express or implied warranties.
While every effort has been taken to ensure accuracy of the information
contained in this article, the author assumes no responsibility for errors
or omissions, or for damages resulting from the use of the information
contained herein.
Dale 'Cat' Robinson - catfromdarwin@geocities.com
16 May 1999