×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • 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!

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

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

printing raster graphics at the top of a PCL page

printing raster graphics at the top of a PCL page

printing raster graphics at the top of a PCL page

(OP)
I am attempting to print a logo at the top of a page which is sent to a HP laserjet printer.

I can enter text and use HP-GL/2 vector graphics to print text or lines close to the top of the page, however I cannot print a raster graphic at the top of the page.

I have checked the raster graphic file and there are no blank lines at the top of it.

I am new to PCL so I could easily be making a silly mistake here. The last line of my PCL is:

<esc>*p1000X<esc>*p0Y<esc>*t150R<esc>*r0F<esc>*r170T<esc>*r1A<esc>*b0Y<esc>*b0M

I have concatenated my raster graphic's pcl formatted binary file to this. The graphic seems to be printed about 1.5 inches below the top of the page. If I replace the above command with:

<esc>*p1000X<esc>*p0Ytop of page

then 'top of page' is printed only about 1 cm from the top of the page.

Any help here would be appreciated.

Neil

RE: printing raster graphics at the top of a PCL page

Well, it sounds as though your raster image may have some white space at the top of the image. But try this...

<esc>*p0Y<esc>*p-100Y<esc>*r1A...your raster image.

How did you get the PCL copy of the raster data? If you printed to a file from a windows driver and then cut that out for this use, there can potentially be something in the raster file that is hurting you.

First, try to insert the <esc>*p-100Y into your existing code.

If that doesn't work, then there is almost certainly something in the raster data that is doing it.

Jim Asman
http://www.spectracolorservices.com

RE: printing raster graphics at the top of a PCL page

Make that <esc>*p-400Y... Adjust value to suit.

Note that a default PCL page has a 1/2 inch top margin; therefore, the position <esc>*p0Y is located 1/2 inch down the page.

Jim Asman
http://www.spectracolorservices.com

RE: printing raster graphics at the top of a PCL page

(OP)
Thanks for your tips. I've made the margin 0 and although this moved the text in the report upwards by 1/2 inch the graphic will not move any further upwards, even when using the *p-400 command. I used ImageMagick to create the raster graphic but have also then used Hex Editor to set the first line of the pcl format file to:

1B2A62323657FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

to ensure that a horizontal line appears at the top of the graphic.

RE: printing raster graphics at the top of a PCL page

Go to my website and download a demo copy of my MKPCL program that converts a raster image to PCL. There are versions for DOS, SCO UNIX, Linux, and freeBSD. So hopefully you are covered.

Try it to make the PCL image and see how you make out. Note that the demo marks the image with a grid.

If you want, email me your existing file and I will have a look at it.  jlasman at telus dot net

Jim Asman
http://www.spectracolorservices.com

RE: printing raster graphics at the top of a PCL page

(OP)
Thanks for your help Jim. The problem was caused by a line feed carriage return being added by the concatenation, inbetween the *b0M and the image.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

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! Already a Member? Login


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