Question on SetupPrinter return values

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Question on SetupPrinter return values

Postby EthicsGradient » Thu Feb 12, 2009 6:14 am

Hi,

I need to be able to select a destination print device and interrogate that device prior to printing (for unprintable areas etc), using the VPE ActiveX object in Visual FoxPro.

The basic way I was going to do this is:

Code: Select all
WITH VPEDoc

   IF .SetupPrinter("", PRINT_ALWAYS) = 0     

      * user selected OK
      .SetPrinter(.DevPrinterOffsetX, .DevPrinterOffsetY)
      .PrintDoc(FALSE)   

   ENDIF

ENDWITH


The problem is that, if I use "", SetupPrinter() returns 3, which indicates "I/O problems during write of setup file" as opposed to 0 for OK.

I don't need to write a setup file as I merely need to get the user to selected the device before I run the print job, which I can't do with PrintDoc(TRUE).

Can I safely ignore this error code or is there a better way to go about this ?

regards,
Matt.
EthicsGradient
 
Posts: 16
Joined: Tue May 20, 2008 6:17 am

Postby IDEAL Software Support » Thu Feb 12, 2009 10:03 am

SetupPrinter() should return 0 in this case. It will be fixed in the next release.

You can safely ignore the return code "3" when specifying an empty file name.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 7 guests

cron