Printing to default printer

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Printing to default printer

Postby Patrick » Mon Feb 13, 2012 3:52 pm

Greetings,

I'm trying to setup a Windows 7 box w 2 printers - a receipt and a laser printer. If I print to the laser printer first, then I cannot print to the windows default printer (receipt) anymore.

I'm using VPE 6.0 pro, and if I use the command:

Invoke Method(#VLR.VLRPrint) Vlpdialog('N') Vlpprinter(' ')

to try to print to the default printer, it prints to any previously used printer (the laser printer). I do not know before hand which printer is the receipt printer, so all the receipt printers are installed as the default printer on that PC.

How can I get around this? Is there a way to trap which printer is the default printer? Or how can I print to the default printer by using a blank printer name?

Thank you,
Pat
Patrick
 
Posts: 23
Joined: Thu Mar 12, 2009 5:44 pm

Re: Printing to default printer

Postby Patrick » Mon Feb 13, 2012 3:56 pm

To be clear:

If I print to printer #1 thusly:

Invoke Method(#VLR.VLRPrint) Vlpdialog('N') Vlpprinter('Prt01')

Then try to print to the default printer (Prt02)

Invoke Method(#VLR.VLRPrint) Vlpdialog('N') Vlpprinter(' ')

It prints to Prt01 instead of Prt02.

Ho can I print to the default printer after printing to Prt01?

Thank you,
Pat
Patrick
 
Posts: 23
Joined: Thu Mar 12, 2009 5:44 pm

Re: Printing to default printer

Postby IDEAL Software Support » Tue Feb 14, 2012 12:51 pm

The manual says: You are also able to select the default output device by setting the property 'Device' to NULL or empty ("").

Code: Select all
Vpe.Device = ""


Did you try this? We can not read your source code, because we do not know this programming language. (What programming language is it?) If possible, please use for source code examples the same notation that we are using in our manuals. It is oriented at languages like C#, Visual Basic and C/C++.
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 51 guests