Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Many thanks to you for putting it together and to the forum members for taking the time to post their replies and give their time to help others. Their isn't another site that can touch it..."

Geography

Where in the world do Tek-Tips members come from?
srwatson (Programmer)
18 Jan 12 10:02
I have a small PCL file (Google's logo) that I've converted to PCL. The structure of the PCL is below. I've been able to get the image to print out correctly to a Kyocera FS-4020DN, SHARP MX-M503N, and one other printer that I don't currently have access to. When I print this Image to a HP Photosmart D110, a HP LaserJet home, and HP LaserJet office printer the image is mostly black.

CODE

*r#S
*t#R
*v6W
*r1A
*b0M
*b#W
*b#W
*b#W
*rC

I looked through the PCL5 comparison guide and noticed the 'configure image data' command isn't support on many of the LaserJet printers. So, I tired removing the configure image data command to try and print a monochrome raster image (As mentioned in the HP RTL guide). The effect was the same.

CODE

*r#S
*t#R
*r1A
*b0M
*b#W
*b#W
*b#W
*rC

- Thanks
DansDadUK (Programmer)
18 Jan 12 10:43
>> When I print this Image to a HP Photosmart D110, a HP LaserJet home, and HP LaserJet office
>> printer the image is mostly black

Possibly because (as you've surmised) these printers do not support the CID mechanism; some may not even support PCL5.

... and just removing the CID sequence doesn't necessarily turn the image into a monochrome image.

We'd need to see samples of your generated PCL files (including the # values and the (#-number of) binary bytes following those sequences, in order to begin to advise.

You can attach sample files to posts via the MediaFire file storage mechanism.
srwatson (Programmer)
18 Jan 12 10:53
How do raster images work on non CID supporting printers?

Would you mind if I emailed you the PCL file? All file sharing websites are blocked.
jlasman (TechnicalUser)
18 Jan 12 10:58
Further, if you are printing the color file to a monochrome
printer, the image must first be converted to grayscale and then
"dithered" to a halftone similar to a newspaper image that only contains BW pixels.

As it is, your image will probably only print correctly on a PCL5c color printer.
 

Jim Asman
http://www.spectracolorservices.com

DansDadUK (Programmer)
18 Jan 12 11:10
Jim is far more experienced than I am as regards raster images, so (as you don't have access to file sharing websites) it would be better to send a sample file to him (contact details via his website), although he's already provided a (very) probable reason for your symptoms.
jlasman (TechnicalUser)
18 Jan 12 14:26
In this PCL context, you are looking at either PCL5c that you are using now where you just send all 24bits per pixel to the printer raw, and the printer does the necessary dithering etc. so you end up with a reasonable image.

The Photosmart, I believe, is proprietary to HP and there is no information available as to its requirements.

That leaves us with PCL3 color printers, historically used by the vast majority of PCL inkjet printers. Today of course, many of the new printers don't speak PCL at all.

Where a PCL5c printer, as per the CID specs accepts the raster data in a single plane as such, and converts the pixels to their appropriate CMY values.

A PCL3 printer requires that you separate each of 3 components into invididual planes that when overlaid on top of each other will produce the image. Basically, you derive 3 monochrome images from that color data, dither them for printing, then combine the 3 planes back together, one row at a time, to send to the printer.

Assuming no compression, a single raster row will look like....

<esc>*b150V Data   (cyan layer)
<esc>*b150V Data   (magenta layer)
<esc>*p150W Data   (yellow layer)

Note that the first two planes commands end with a "V" which tells the printer NOT to increment the row. Only when the command ends with the "W" is the row incremented. Then the process repeats until all rows are done and the image is complete.

In the past, I have made an image this way and it prints quite nicely on one printer, but looks terrible when printed on a different. You are basically trying to create a PCL file that is all things to all printers. It's a lot of work.

Of course non HP compatible printers are out of the question.

Jim Asman
http://www.spectracolorservices.com

srwatson (Programmer)
18 Jan 12 18:14
I'm now using the following format like you suggestion

CODE

<esc>*b150V Data   (cyan layer)
<esc>*b150V Data   (magenta layer)
<esc>*p150W Data   (yellow layer)

I'm seeing the same results. The link to my PCL file can be found below.

http://www.mediafire.com/?r99sld657a57mwc
srwatson (Programmer)
18 Jan 12 18:30
Sorry, the last PCL file was the wrong one. I linked the PCL file below that I was originally talking about. When I tried splitting the colors into there own commands as showed in my previous post it didn't work for me (I'm assuming that's my own fault) and rendered the file I attached in the previous post.

http://www.mediafire.com/?tgd02dj5tbwb7un
jlasman (TechnicalUser)
18 Jan 12 19:32
Well, first of all you need to define the color space. Try
<esc>*r3U
for using RGB values.

The CID command is PCL5c ONLY.

Your <esc>*b### commands all state ZERO bytes followed by a bunch of data, effectively garbage.

Do you understand that the dithering process takes the 24 bits per pixel in the original and effectively reduces it to 3 bits in the PCL output. Just reading in the values in the image file is a long way from a printable PCL3 file. You basically divide the original 24 bpp file into three 8 bpp files which are then dithered down to 1 bpp in each.

You need to read up on dithering images. It will take some effort.

I would suggest that you first start out trying to create a printable grayscale image, and once you have that working then project your new found knowledge into printing a color image

Jim Asman
http://www.spectracolorservices.com

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close