Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Imbedding Images in a pcl file

Status
Not open for further replies.

dyerg

Programmer
Apr 24, 2001
5
US
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???
 
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
jim@spctra.wimsey.com
 
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!!
 
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


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top