DEVSENDDATA

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

DEVSENDDATA

Postby IDEAL Software Support » Tue Nov 23, 2004 4:07 pm

I want to sent a string directly to the printer.
tovpe.devsenddata returns a 0.
I read that this can be only done in the pirnt_devdata so i put my
function call into this method. But no reaction.

I need to sent to a PCL printer the command to use a stored macro.
For example Macro 1.

I use the command
pcBEF = chr( 27 ) + chr( 38 ) + chr( 102 ) + chr( 49 ) + chr( 89 )
tovpe.devsenddata( pcBEF )
to Send the macro number to the printer afterwards i send
pcBEF = chr( 27 ) + chr( 38 ) + chr( 102 ) + chr( 51 ) + chr( 88 )
tovpe.devsenddata( pcBEF )
that shall call the macro.

In doprintdevdata i call my function

If i send the command within foxpro directly to the printer all works
fine. But i need it in VPE.

I work with visual Foxpro 7 and vpe 3.5
Last edited by IDEAL Software Support on Tue Nov 23, 2004 4:09 pm, edited 1 time in total.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 4:07 pm

If it doesn't work, this means it can not be made to work due to the printer driver. The DevSendData() method is very critical, as explained in the manual / help file. It was implemented for completeness, but you have to be aware that this function is dependent on the printer driver.

Your argument that it works if done with VFOX is not relevant for the problem. As far as we know VFOX calls the WIN API OpenPrinter() function and sends the data as text data directly to the printer. This is simple. In contrast, DevSendData() tries to send text data within a running GDI based print job through the printer driver - this is a completely different and critical task.

We strongly recommend, not to use and not to rely on the DevSendData() method.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 45 guests