PCL image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
lcohen999
Posts: 7
Joined: 2010-01-18T13:30:56-07:00
Authentication code: 8675309

PCL image

Post by lcohen999 »

We are trying to convert some JPG and BMP files into PCL files for printing.

the conversion works OK (the image seems a little washed out) but our bigger issue, is imagemagick seems to be putting in the PCL code 1B45 all over the place. That effectively resets/sends a partial form feed to the printer and we cannot print anything else after that image.

We have tried to disable it, but have not had good success.

Any suggestions on how we can get rid of it?


Thanks!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: PCL image

Post by magick »

Which version of ImageMagick? If you have an older version, try the latest: ImageMagick 6.5.9-0. If that fails, take a look at the source code as ImageMagick-6.5.9-0/coders/pcl.c. We do not see the escape sequence you mentioned.
lcohen999
Posts: 7
Joined: 2010-01-18T13:30:56-07:00
Authentication code: 8675309

Re: PCL image

Post by lcohen999 »

I tried it with the latest version and the same results

There are 1B45 codes within the file.

I found one at the beginning, so I cannot even print any text above.

I looked at the pcl.c code but I have no idea of what any of it means!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: PCL image

Post by magick »

Where is this IB45 located? When we converted to PCL and looked at the output image we could not find a 1B45 character sequence. Post a URL to an input image and the resulting PCL and identify which position in the file you find a 1B45 character sequence. We need to reproduce the problem before we can offer a solution.
lcohen999
Posts: 7
Joined: 2010-01-18T13:30:56-07:00
Authentication code: 8675309

Re: PCL image

Post by lcohen999 »

I will send you the link tomorrow

I appreciate your help and quick responses!
lcohen999
Posts: 7
Joined: 2010-01-18T13:30:56-07:00
Authentication code: 8675309

Re: PCL image

Post by lcohen999 »

...also, are you doing anything more than convert image.jpg image.pcl ?
lcohen999
Posts: 7
Joined: 2010-01-18T13:30:56-07:00
Authentication code: 8675309

Re: PCL image

Post by lcohen999 »

The first two characters of the converted .pcl file already contain that sequence
It is the escape sequence to reset the printer
There are the first 128 Characters of the file (in Hex)
That will automatically print a partially printed page and consequently do a Form Feed

1B451B266C30451B2A7233461B2A743735521B2A72343830541B2A72363430531B2A763657000300
0808081B2A7231411B2A6230591B2A62304D1B2A6231393230570505050000000808080505050606
06010101000000000000060606000000000000000000141414000000010101010101000000161616
0000000000000000

Also the last two bytes if the file are the same as you see in the example :

5074594E72574C70554A705B4A735E4D7762517A65547B66557A655478635277625175604F766150
7863527964537A65547A65547964537964531B2A7230431B45

I can email you the picture, I don't have anywhere to host it
lcohen999
Posts: 7
Joined: 2010-01-18T13:30:56-07:00
Authentication code: 8675309

Re: PCL image

Post by lcohen999 »

I was hoping to re-visit this issue as color printing is becoming more and more of a request.

Running the latest version of ImageMagick, it converts the image perfectly with the exception of the PCL code 1B45 at the beginning and the end, (1B45 resets the printer) so I cannot insert the image into the middle of a form.

Any help would be greatly appreciated!
Post Reply