I suspect your issue is in using the execute statement on line 10.
Here's how we print logos on our customer facing documents:
***********
GET.IMAGE:
**********
OPENSEQ UNIX.FILE TO IMAGE.FILE ELSE RETURN
LOOP.END = 0
ESC = CHAR(27)
IMAGE = ''
LOOP
READBLK DATA FROM IMAGE.FILE,64 ELSE LOOP.END = 1
UNTIL LOOP.END DO
IMAGE := DATA
REPEAT
IF IMAGE[1,1] = ESC THEN IMAGE = IMAGE[2,LEN(IMAGE)]
DCNT = DCOUNT(IMAGE,ESC)
FOR D = 1 TO DCNT
ITEM = FIELD(IMAGE,ESC,D)
BEGIN CASE
CASE INDEX(ITEM,'p0x',1)
XPOS = FIELD(FIELD(ITEM,"x",1),"p",2)
YPOS = FIELD(FIELD(ITEM,"x",2),"Y",1)
PRINT ON 1 ESC:'*p':XPOS+XOFF:'x':YPOS+YOFF:'Y':
CASE ITEM = '*p0x'
PRINT ON 1 ESC:'*p':XOFF:'x':
CASE 1
PRINT ON 1 ESC:ITEM:
END CASE
NEXT D
CLOSE IMAGE.FILE
RETURN
This is subroutine is contained within a particular report program we
use - however, we have an external subroutine that we often call that
does exactly the same thing. We simply call the subroutine to print the
logo on the document.
Note: you'll have to change the printer # - we use 1, I see you're using
11
UNIX.FILE = the full UNIX path to the .pcl logo file we have stored on
our system.
Good luck. Hope this helps.
Barry Rutherford
Programmer / Analyst
MobilexUSA
920 Ridgebrook Rd, Sparks, MD 21152
Direct: 443-662-4162
Toll Free: 800-786-8015 ext. 4162
Fax: 443-662-4225
http://www.mobilexusa.com
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of David Hoover
Sent: Wednesday, May 20, 2009 1:05 PM
To: [email protected]
Subject: [U2] PCL problem on U2
I am trying to place a logo that is stored at
/area1/dh.temp/M100_3Logo.pcl
on a form that I am creating in PCL5. I have no problem with the
shading,
boxes, or data. I am having a problem getting the logo to be printed.
Base information:
OS - RedHat Linux
Running U2
Printer is IBM InfoPrint 1464 Color
Logo file original name: 3Logo.jpg
After running thru IPX20xx converter from IBM: M100_3Logo.pcl
(Set this up as Macro 100)
Here's the code that I am currently trying to work with:
0001: EXECUTE 'SETPTR 11,,,,,, NHEAD, FORM IBM, AT PR33'
0002: PRINTER ON
0003: *
0004: PRINT ON 11 CHAR(27):"E"
0005: PRINT ON 11 CHAR(27):"&f100Y"
0006: PRINT ON 11 CHAR(27):"&f0X"
0007: PRINT ON 11 CHAR(27):"&a540h780V"
0008: PRINT ON 11 CHAR(27):"*t300R"
0009: PRINT ON 11 CHAR(27):"*r100A"
0010: EXECUTE "SH -c 'lp -d PR33 /area1/dh.temp/M100_3Logo.pcl'"
0011: PRINT ON 11 CHAR(27):"*rC"
0012: PRINT ON 11 CHAR(27):"&f100X"
0013: PRINT ON 11 CHAR(27):"&f4X"
0014: PRINT ON 11 "THIS IS A TEST OF THE MACRO"
0015: PRINT ON 11 CHAR(27):"E"
0016: PRINTER OFF
0017: END
Thanks in advance for any and all help you can offer.
David Hoover
Illinois Lock
(847) 537-1800 x293
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/