Alaska Software Inc. - HP PCL Printing to file instead of Printer
Username: Password:
AuthorTopic: HP PCL Printing to file instead of Printer
Don SchmitzHP PCL Printing to file instead of Printer
on Fri, 01 Sep 2006 12:09:26 -0500
I have a program that prints to laserjets that uses  a number of different
fonts and spacing looks great on paper but would like to see if it could be
setup to print to a file and displayed on screen.
I have printed to file before using clipper but was looking for a little
help in maybe something new in printing to the screen in Xbase.  The program
sends escape sequences for font calls (HP PCL) for the printer and would
like someway for this to be formated to the screen.  I thought of sending to
a file and then use some screen viewer to view the output (Swift view), how
I would do it in clipper.
Looking for some guidence/ideas.  Fairly new to Xbase.

Thanks


*********************************************
Don Schmitz
University Hospital Surgery Dept.
600 Highland Ave. F8-164
Madison, WI  53792
(608) 263-9307
Email: Dons@surgery.wisc.edu
Clayton Jones Re: HP PCL Printing to file instead of Printer
on Fri, 01 Sep 2006 21:58:46 -0400
Hello Don,

>I have a program that prints to laserjets that uses  a number of different
>fonts and spacing looks great on paper but would like to see if it could be
>setup to print to a file and displayed on screen.
>I have printed to file before using clipper but was looking for a little
>help in maybe something new in printing to the screen in Xbase.  The program
>sends escape sequences for font calls (HP PCL) for the printer and would
>like someway for this to be formated to the screen.  I thought of sending to
>a file and then use some screen viewer to view the output (Swift view), how
>I would do it in clipper.
>Looking for some guidence/ideas.  Fairly new to Xbase.

There are several issues to consider.  In Windows graphical printing
we no longer talk directly to the printer (with escape codes, etc),
but instead we talk to the printer driver (which is a different sort
of language) and the driver talks to the printer.  This means that our
Clipper reports with PCL codes must be converted.

However, Xbase++ allows us to use our existing Clipper style report
code and send it to the printer just as we did in Clipper.  The
drawback is we don't get the advantages of print spooling.  These
reports behave just like a DOS app and can cause havoc on a busy
network, etc.  But we do have the choice.

To your question, I don't know of a utility that will do what you ask,
but if you can convert your reports to Windows style output, you will
have the benefit of Print Preview routines as well as the advantages
of print spooling.  So there are good incentives to convert.

This may sound daunting, but the add-on product Top-Down Library has a
printer class that makes it easy to convert Clipper reports.  Users
say they convert even complex reports quickly.  Output code such as
@4,2 SAY "Hello World!"  (or ?/?? syntax) can remain with few if any
changes.  Control codes are replaced with things like these
  oP:NewFont("10.Arial Bold")
  oP:setCond("on")
  oP:SetBold("off")
  oP:NewPage()
So basically some judicious search/replace operations can accomplish
the conversion of the output code with few if any changes to the data
logic.  The biggest chore is converting the user interface, but
Top-Down has several pre-written examples and templates to make it
easier.

In addition Top-Down has a very good Print Preview option that is also
easy to integrate into your report.  The user can print multiple
copies of the entire report, the current page, or a range of pages. It
can also do graphs.

A demo of Top-Down which has several report samples can be downloaded
here  http://www.cjcom.net/tdcore.htm  (look for the "Download" page).
There is also a "User Comments" page which has several references to
the printer class.  If you think you want to convert, it's a good way
to go.


Regards,
Clayton

Clayton Jones   www.cjcom.net 
 Top-Down Library for Xbase++
 X-DBU Database Utility   
 X-MEMO Memo Field Replacement
AUGE_OHRRe: HP PCL Printing to file instead of Printer
on Sat, 02 Sep 2006 07:51:53 +0200
hi,

> I have printed to file before using clipper but was looking for a little
> help in maybe something new in printing to the screen in Xbase.

in "general" GUI Screen / Printing have "0,0" in "lower"-Left while
a Cl*pper DOS Screen / Printing start "0,0" in "Upper"-Left ...

> sends escape sequences for font calls (HP PCL) for the printer and would
> like someway for this to be formated to the screen.

... hm ... you can STRTRAN your ESC sequence to ...

> I thought of sending to a file and then use some screen viewer to view the
output
> (Swift view), how I would do it in clipper.
> Looking for some guidence/ideas.  Fairly new to Xbase.

... a RTF file ! use MemoRead on your PCL file and STRTRAN() each
MemoLine() from your ESC into RTF Syntax. After that you can use
XbpMLE with oMle:Format := 3 to show / save "formated" RTF file.

greetings by OHR
Jimmy
Don SchmitzRe: HP PCL Printing to file instead of Printer
on Fri, 08 Sep 2006 11:32:18 -0500
Found a program called Swiftview which will display PCL code very nicely so
shelling to it to view the file.



*********************************************
Don Schmitz
University Hospital Surgery Dept.
600 Highland Ave. F8-164
Madison, WI  53792
(608) 263-9307
Email: Dons@surgery.wisc.edu