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

Imbedding Images in a pcl file

Imbedding Images in a pcl file

Imbedding Images in a pcl file

Good Day, I am a pcl novice and am trying to import, insert, or imbed an image into a pcl file.

I have converted an image to a pcl file with a conversion utility successfully. In unix, I can send this file to a printer and it prints correctly. Now, I would like to add this "image" file (actually a logo) to another pcl document (a packing slip), on the fly.

Am I in over my head???

RE: Imbedding Images in a pcl file

This is pretty easy on Unix.

You have your form as an automatic overlay, and
it in turn calls the logo macro. The file that is the
logo can be tied to the current "tty" in the
Unix directory structure, and your application
would collect the right file based on the login.

It's easier than it probably sounds. The key is
the flexibility of the application to download
a file to the printer.

Jim Asman

RE: Imbedding Images in a pcl file

Hi Jim,

Thanks again for the info on your program. I hate to sound ignorant, but I am ignorant in pcl!! But, you write "...The file that is the
logo can be tied to the current "tty" in the
Unix directory structure, and your application
would collect the right file based on the login...". How is this done? Again, any help is greatly appreciated!!

RE: Imbedding Images in a pcl file

Without knowing the specifics of your application it
is difficult to go into much detail, but consider.

Let's say your application will always the use the file
"logo.pcl" to print the packing slip. Now somewhere
in the filesystem resides a hundred different logo
files...   companyA.pcl, companyB.pcl, etc.

At runtime you can copy the appropriate companyX.pcl
file to logo.pcl. But you say I have 40 users all
working at the same time. This is where the tty comes
into  play.

If you set a directory, let's say, /u/ttys, and populate
it with subdirectories named for real ttys; e.g.,
tty01, tty02, ttyp34, ttyp36, ...   

Your application can extract your tty from the
environment. The correct company.pcl is copied
into /u/$tty Then the application sends $TTY/logo.pcl
to the printer.

Some of the setup may happen in a shell script before
the application is run. This way, every login will
have a unique entry in the ttys directory.

I use a database called filePro. It maintains an
environmental variable that contains the PATH for
files to be downloaded. In this case it is trivial
to make this work.

You can get awfully creative in making it do what
you want. Exactly how you get there will depend on
what facilities your application provides.

Jim Asman

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