Print logo on PCL5 document from AIX6.1


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Print logo on PCL5 document from AIX6.1
# 1  
Old 04-16-2015
Question Print logo on PCL5 document from AIX6.1

Hi

I have inherited an application with generates PCL5 (HP-GL/2) format documents with simple text, lines and barcodes printed from AIX6.1 server with the qprt command to HP4500 printers. But we need to add a company logo to the document. The logo could be easily provided in TIFF, JPG, Word DOC, etc.

What is the best way to add the logo and formatting to text to print from AIX? PCL5 is just the current method for the basic report, but could be changed to a better suggestion.

Or what is the best way to convert an image to PCL5 (keeping the quality of a smooth image)? And how does this append onto the text portion of the PCL file?

Thanks for any help
# 2  
Old 04-16-2015
This link suggests it's possible by adding headers to your pages.

Review the HP PCL Reference Set to see how you'd embed an image in your header, see the 'start raster graphics' command.

Commands in PCL begin with an ESC character, 0x1b, followed by a few ascii letters defining the command and data. 'Printer reset' for example is as simple as ESC followed by the ascii letter E, and absolutely nothing else.

Remember that PCL is not a document language. It does everything on the level of "move to here, draw this, move to next line, draw that, move there, draw that, next page, draw that"... It will not care or realize if you draw your logo on top of anything else important.

Last edited by Corona688; 04-16-2015 at 12:38 PM..
# 3  
Old 04-16-2015
I think you have to issue a 'set resolution' command before you issue the 'raster graphics' one.
# 4  
Old 04-16-2015
This page explains a little more. The web page no longer exists but I had a copy I kept when I started playing with PCL...
# 5  
Old 04-16-2015
Here is a tiny script which outputs raw PCL.

Code:
#!/bin/bash

Y=1200  # Position on paper
X=1200

H=150   # Height in pixels
W=19    # Width in pixels / 8

printf "\x1b*t300R"             # Set 300DPI
printf "\x1b*b0M"               # Set graphics mode 0, raw bytes
printf "\x1b*p${Y}Y"            # Move cursor Y
printf "\x1b*p${X}X"            # Move cursor X
printf "\x1b*r1A"               # Start raster graphic at cursor

for ((M=0; M<H; M++))
do
        printf "\x1b*b${W}W"    # Tell it this line is W bytes of pixel data.

        # Actual data bytes.  Each bit is one column.  \xff is 11111111
        for ((N=0; N<W; N++)) ; do printf "\xff" ; done
done

# End graphics and reset (i.e. restore cursor, etc)
printf "\x1b*rC"

If you run this and pipe its output into a PCL printer, it prints a 1/2" by 1/2" black square in the middle of the page via raster graphics.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. What is on Your Mind?

Linux logo and logotype

Hello, this is my contribution to open community (LINK): tovic.eu/design/logo/gnu-linux/ If you find it interesting, use it ... Best regards (0 Replies)
Discussion started by: Skulptron
0 Replies

2. AIX

Upgrade AIX 5.3 to AIX6.1

Dear Guys .. I'm going to Upgrade one of the servers AIX 6.1 I want to stop rootvg mirror to save the mirror then upgrade to AIX 6.1 this is to help me in rollback if something goes wrong but .. can anyone help me how to make sure that system is relay mirrored and how to know that second... (10 Replies)
Discussion started by: top.level
10 Replies

3. Shell Programming and Scripting

upload logo on script

any ideas on how to upload logo on a script?(solaris script) (3 Replies)
Discussion started by: lhareigh890
3 Replies

4. Shell Programming and Scripting

Here document inside a here document?

Can we use a here document inside a here document? Something like this ssh user@remotehost << REMOTE sudo vserver vsernamename enter << VSERVER perform actions on vserver. VSERVER REMOTE (6 Replies)
Discussion started by: mnanavati
6 Replies

5. What is on Your Mind?

Cool new logo

I saw this on another board, and burst out laughing. http://www.brandsoftheworld.com/brands/0011/0070/brand.gif Apparently it's a new logo (may even be a new name) for a clothing line. Check them out: www.A-Style.it (9 Replies)
Discussion started by: Dave Miller
9 Replies

6. Solaris

OpenBoot OEM Logo

If you have a graphic display you see some sort of logo in OpenBoot immediately after a reset or when you run the banner command. With most systems, you see a spiffy multicolor logo generated by a routine on the video card. But if you have a low-rent video card you just see a plain monochrome Sun... (2 Replies)
Discussion started by: Perderabo
2 Replies

7. Solaris

dtlogin logo

hiho, where are the frisky CDE admins.... ;-) how can i change the welcome logo? i found the /usr/dt/config/C/Xresources and the entry: Dtlogin*logo*bitmapFile: but when i enter my own *.bm or *.xpm file the screen use a black logo.... i think i am using the wrong resolution for my picture...... (3 Replies)
Discussion started by: pressy
3 Replies

8. Post Here to Contact Site Administrators and Moderators

The unix.com logo - anyone else seeing this?

Hi All I'm not sure if anyone else notices this or not - however when I view the unix.com forums in Windows, the flash logo at the top of the page absolutely kills my performance - CPU usage rockets to 100%! If you open the task manager and monitor performance, and slowly scroll down so that the... (1 Reply)
Discussion started by: saabir
1 Replies
Login or Register to Ask a Question