Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to manipulate printer from program

Status
Not open for further replies.

rich110

Programmer
Jan 4, 2003
72
HK
Hi,

Our application has to print various paper size and in landscape mode. We had made several 'printers' for just 1 physical printer on each workstation. As the no of printers grows it just gets out of hand. Is there any way to manipulate the printer settings thru the program ( or utilities provided by 3rd parties ) just for 1 print job (not thru interactive prompts like Excel or Words)?

Tks for helping
 
You can utilize the specific printer's Printer Command Language (PCL) and control these parameters.

Look on the new to find a listing of your printer's PCL or Programmer's Reference. That should give you the character strings required to "communicate" with the printer.

From there it depends on how you are sending your Reports to the printer.

* --- Old Hard-code style ---
@ Row, Col SAY

* --- Alternate Old Hard-code style ---
? Printout Line

* --- FP's Report ---
REPORT FORM MyReport NOCONSOLE TO PRINTER

With the 2 hard-code styles you send the character strings at the appropriate time as additional output lines.

With the Report form approach you create a Text Box on the report and output the character string there.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Hi,

Tks for the tip. But would they work as we are on window platform? I have done that in DOS days but now.....
 
Which FoxPro version do you use? If you are using FoxPro version 2.6a for DOS or earlier, then you are not using the Windows installed printers anway, as your DOS-based FoxPro program does it all.

Excel, Word, and other Windows programs are designed to use the installed printer drivers, but DOS programs are largely ignorant of those aspects of Windows. Running a DOS program on a Windows computer works okay, just those DOS programs cannot do some of the "newer" stuff done by Windows such as printing to Windows installed printer drivers and USB-connected printers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top