printing with PCL

63 views
Skip to first unread message

Steve Trimble

unread,
May 7, 2008, 1:18:41 PM5/7/08
to OpenQM
here is my SETPTR statement:
SETPTR 0,90,60,0,2,1, AT "\\IBM220\HPJET", PCL, CPI 16, LEFT.MARGIN 2,
PAPER.SIZE LETTER

here is my SETPTR DISPLAY result:
Unit Width Depth Tmgn Bmgn Mode Options
0 90 60 0 2 1 AT \\IBM220\HPJET, LEFT.MARGIN 2, PCL,
CPI 16, LPI 6, WEIGHT MEDIUM, SYMBOL.SET ROMAN-8,PAPER.SIZE LETTER

so what caused it to decide: LPI 6, WEIGHT MEDIUM, SYMBOL.SET
ROMAN-8 ?

this is from the documentation under !PCL()

Example

PRINTER ON
PRINT PCL.RESET() :
PRINT PCL.FONT('Courier, Pitch 10, Regular') :
PRINT PCL.BOX(300,300,300,100,2,15) :
PRINT PCL.CURSOR(350, 380) : 'Hello' :

The above program prints the word Hello in a box with rounded corners.

the above program will not even compile, so how it prints 'Hello' is
beyond me.
i even read through parts of the 'Getting Started in OpenQM - Part
1' (see page 80 +)
the explanation there shows setting up printers AS NEXT QMPRINT, then
eventually SPOOL $HOLD QMPRINT_0000
that example doesn't work because the SETPTR is set to go to a hold
file.
now if you eventually figure that you are SPOOLing your hold file back
to another hold file, you understand why nothing prints.

would anyone care to share documentation that explains how to use PCL
in QM?
it would sure decrease my learning curve (probably others as well)

thanks in advance


Brian Speirs

unread,
May 7, 2008, 11:55:21 PM5/7/08
to OpenQM
Hi Steve,

First of all, the character set and LPI are reported as they are
because they are the defaults. It seems that if you specify a printer
without any of the options these defaults are not displayed, but once
you specify some particular options, then the other defaults are
displayed.

Before you try PCL printing, can you print anything at all?

Is your printer a GDI printer? If so, note that PCL commands do not
work with GDI printers. You could try adding RAW into the options for
the print unit (but of course, this won't help for GDI printers).

For the program referred to in the !PCL subroutine, try including the
header record for the routines: eg

$INCLUDE SYSCOM PCL.H

Overall, I print to hold files because I use a Windows system with GDI
printers, but by using a PCL viewer, I get proper PCL printouts on
those printers. Try PrintWizard or PCLReader.

Cheers,

Brian Speirs

Martin Phillips

unread,
May 8, 2008, 3:02:35 AM5/8/08
to Ope...@googlegroups.com
Hi Steve,
 
> so what caused it to decide: LPI 6, WEIGHT MEDIUM, SYMBOL.SET
> ROMAN-8 ?
These are the defaults. You can change default settings by creating a $PCL VOC record as described under the SETPTR command.
 
 
> PRINTER ON
> PRINT PCL.RESET() :
> PRINT PCL.FONT('Courier, Pitch 10, Regular') :
> PRINT PCL.BOX(300,300,300,100,2,15) :
> PRINT PCL.CURSOR(350, 380) : 'Hello' :
>
> The above program prints the word Hello in a box with rounded corners.
>
> the above program will not even compile, so how it prints 'Hello' is
> beyond me.
As the second sentence of the relevant documentation section says, the functions are defined in the PCL.H include record. We will modify the example to show use of the include record.
 
 
Martin Phillips, Ladybridge Systems Ltd
 
 

CDMI - Steve Trimble

unread,
May 8, 2008, 8:32:12 AM5/8/08
to Ope...@googlegroups.com
thanks Brian. i can print to my printer. it is a HP LaserJet 2100 Series PCL 6 printer. i understand the difference between GDI and PCL. i downloaded and installed PCL Reader Version 8.49. i went thru the scenario in Getting Started which created the $HOLD file entry. i opened PCL Reader and drug the $HOLD 'QMPRINT_0008' file entry into it. it processed for a second or two, created: QMPRINT_0008.log, QMPRINT_0008.tnx, QMPRINT_0008.hix, and returned: Couldn't open image file 'Z:\REMOTE.BUYBACK\$HOLD\QMPRINT_0008.
 
the .log item has this in it:
 
ptc32 Version 8.30     Thu May 08 07:19:04 2008
Message : Indexing Z:\REMOTE.BUYBACK\$HOLD\QMPRINT_0008
Message : -----------------------------------------------
Message : Processing Z:\REMOTE.BUYBACK\$HOLD\QMPRINT_0008
Message : PCLR_849 - PT232-104-849:08490123135
Message : Total Number of Pages Processed = 4
Message : Processing Completed/Return Code = 1
Message : Elapsed time = 1.625 seconds
Message : 0000000000-0000000004-00000:0180265362

 

i'm sure i'm doing something wrong, just don't know what. hopefully i've followed the documentation as presented.

it's just a little frustrating to me to have documentation that takes you close to the finish line and then drops you off.

 

the getting started is really great as is the QM system. i'm very excited about it and am supporting it financially as well as investing lots of learning time.

 

i really didn't think i'd run into these pitfalls being a PICK programmer since 1978. most of the programming stuff is easy. its installation, print issues, proc issues, query and dictionary issues that have brought progress to a grinding halt.

 

i just learned something else yesterday regarding the TERM VPAT-A2. it is basically a 80 column terminal type. but if you use the ADDS4000-AT all works just fine. who'd have known? thanks to Pete from AccuSoft for that revelation.

 

thanks also to ALL in this group for their comments and suggestions. also thanks to Doug Dimitru and sir Martin!


 
Steve Trimble
Computerized Data Mgmt Inc
PO Box 13403
Maumelle, AR 72113
(501) 803-0974 09:00am - 6:00pm CST
 
Home of self defense products: http://www.protecturself.com


> CPI 16, LPI 6, WEIGHT MEDIUM, SYMBOL.SET ROMAN-8,PAPER.SIZE LETTER

>
> so what caused it to decide: LPI 6, WEIGHT MEDIUM, SYMBOL.SET
> ROMAN-8 ?
>
> this is from the documentation under !PCL()
>
> Example
>
> PRINTER ON
> PRINT PCL.RESET() :
> PRINT PCL.FONT('Courier, Pitch 10, Regular') :
> PRINT PCL.BOX(300,300,300,100,2,15) :
> PRINT PCL.CURSOR(350, 380) : 'Hello' :
>
> The above program prints the word Hello in a box with rounded corners.
>
> the above program will not even compile, so how it prints 'Hello' is
> beyond me.

Dick Thiot

unread,
May 8, 2008, 9:58:07 AM5/8/08
to Ope...@googlegroups.com
Steve,
 
I don't know if PCL6 is supported or not but I do know that HP make a HUGE change going to PCL6 and it is NOT backwards compatible and does not support the old Escape sequences that drove prior versions of PCL.  We have had lots of problems with old programs that pushed PCL Escape sequences out to printers.

We have started to look at Print Wizard since it is integrated but are looking for other options too.
 
Dick

Martin Phillips

unread,
May 8, 2008, 10:02:58 AM5/8/08
to Ope...@googlegroups.com
Hi Steve,

> its installation, print issues, proc issues, query and dictionary issues
> that have brought progress to a grinding halt.

What Proc and dictionary issues have you had? Given that we support Procs
and A/S type dictionary items close to 100% compatible with D3, I am
intrigued to know what we have missed.


Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200

Martin Phillips

unread,
May 8, 2008, 10:24:56 AM5/8/08
to Ope...@googlegroups.com
Hi Dick,

> I don't know if PCL6 is supported or not but I do know that HP make a
> HUGE change going to PCL6 and it is NOT backwards compatible and
> does not support the old Escape sequences that drove prior versions of
> PCL.

It's a good job that we made all the escape sequence generation user
modifiable!

If anyone wants to submit PCL6 equivalents, we will gladly incorporate
these.

Dick Thiot

unread,
May 9, 2008, 9:09:50 AM5/9/08
to Ope...@googlegroups.com
Martin,
 
Unfortunately, I don't think it is as simple as replacing the escape sequence generator since PCL6 is not an ASCII sequence as in past versions of PCL.  It is a binary stream designed to load faster and provide more compatibility and future support across HP printers.  PCL6 has been available for years but now I think we are starting to see the phase out of PCL5 drivers.  This is probably most true with Vista.  The best resources that I have located on HP's site on PCL6 are on their developer site at http://new.hpdevelopersolutions.com/SPP/Public/Sdk/SdkPublicDownload.aspx.  You will have to first select LaserJet and Digital Sender under the kit area then expand that to get to Printer Languages then PCL6.  There is a good starter document under PCL6 FAQ and other information.  I think the long and the short of it for Windows systems is to drive printing through the O/S printer driver and not raw.  I am not sure what the answer for Linux is.
 
Dick

Brian Speirs

unread,
May 9, 2008, 6:27:01 PM5/9/08
to OpenQM
Hi Steve,

I found your experience with PCL Reader odd - until I tried double-
clicking on the print file and selecting PCL Reader from the list of
applications to open the file. In that case, I get a message "Couldn't
open image file xxxxx" - which is consistent with your experience.

However, it does work by opening PCL Reader first, then clicking on
the 'View PCL' icon and selecting the print file. The log file also
has a few more lines in it.

I hope this helps.

Brian

CDMI - Steve Trimble

unread,
May 9, 2008, 7:41:16 PM5/9/08
to Ope...@googlegroups.com
yep, you're right Brian.
i clicked on the view PCL icon, selected the print file and waalaa!
thanks sir!
 
Reply all
Reply to author
Forward
0 new messages