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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PCL file

Status
Not open for further replies.

foxbldr

Programmer
Apr 16, 2002
109
CA
I generate reports with PCL codes(ie. CHR(27)+"(s16901T", etc,.. etc.). When I send the output to a file with the command "SET PRINTER TO annual.rpt" ,it creates the file and can be sent to a printer with "COPY annual.rpt LPT1" without any problem. But, when I open the file with Word or any other editor it displays all ESC codes. What should I do so that it can be view with an editor. I use Foxpro 2.6.
 
Well, I think you have to pre-process it for on-screen viewing. You will need to write a program to strip off the printer codes before you show it on screen.

This is usefull when you are viewwing your file within your program.. say via... MODI FILE <filename> NOEDIT command.

But if you are going to use other editor like Edit, Notepad or even Word... you will need to fix the file yourself.
 
foxbldr,
as reliable identify PCL code is not simply,
try prevent its creating.
For example set global variable
pcl = .f. for output to screen or editor,
pcl = .t. for output to printer,
and your PCL code in report may be
iif(pcl, CHR(27)+&quot;(s16901T&quot;, &quot;&quot;) etc, etc...
Tesar
 
Dear Tesar/WildSwan2k,

Thanks for the suggestion. When I remove PCL codes I can't draw tables, lines,etc in the report. Actually, my ultimate target is direct the output to a fax machine. I want to preserve PCL codes. Any other suggestions?

Thanks
Foxbldr
 
Foxbldr, if you want preserve graphic elements,
you must go to FoxProW, or Visual...
(although i create lines and tables in dos report,
but not with PCL...&#9484;&#9488; etc)
Tesar
 
Tesar,

I/We are in the process of re-writing our legacy system in VFP7 and it will take another 10,11 months to deploy the product. The current system written in FPD26 generates many reports with tabulated data everyday and it is taking considerable amount of time to walk to a fax machine and fax them to our employees working in the field. What I want is quick and easy solution.


Thanks once again for the help.

Foxbldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top