Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WPCIWIN.VBX and PerfectScript Commands

1 view
Skip to first unread message

Patrick Lujan

unread,
Apr 13, 1998, 3:00:00 AM4/13/98
to

I have a VB 4.0 (16-bit) app communicating to WP 7.0 (for Win 3.x) which
executes a number of PerfectScript commands via the WPCIWIN.VBX control.
My problem is that I can't correctly control my printer output to a
specific printer driver. The print device is defined in WIN.INI as
follows:

[PrinterPorts]
FileNet TIFF=TIFFDRVR,C:\TEMP\FNOUT.TIF,15,45

[devices]
FileNet TIFF=TIFFDRVR,C:\TEMP\FNOUT.TIF

This driver re-directs print output to a TIFF file. In my code (after
previously selecting this printer within WP natively), I execute the
following commands to check the printer values for this device:

'get the current WP printer settings
PScript1.CommandString = "?CurrentPrinter"
CurrentPrinter = PScript1.CommandReturn
PScript1.CommandString = "?CurrentPrinterPort()"
CurrentPrinterPort = PScript1.CommandReturn
PScript1.CommandString = "?CurrentPrinterType()"
CurrentPrinterType = PScript1.CommandReturn

Later on in my procedure I try to print a document to this device:

'print the file to the FileNet TIFF driver
'concatenate the command string
CommandString = CurrentPrinterType & "; " & CurrentPrinter & "; " &
CurrentPrinterPort
PScript1.CommandString = "PrinterSelect(""" + CommandString + """)"
PScript1.CommandString = "PrintFullDoc()"
Debug.Print PScript1.CommandError

This should work, but it doesn't. I don't get an error, but the
document doesn't print either. I've noted in the Corel SDK
documentation that there are four enumerated data types (0,1,2,3) for
the PrinterType variable but the ?CurrentPrinterType command above
returns a value of '4.' I've had to use a PrinterSelectDlg command as a
workaround because I can't get the program to print to the right device.

Any help appreciated in advance.

plu...@bennu.com

0 new messages