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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

embedding EPS via 'run' - path syntax?

Status
Not open for further replies.

Hemo

Programmer
Apr 9, 2003
190
0
0
US
I've been reading the FAQ and other articles on embedding EPS files into a PS document and have had success is doing this only when the EPS is located in the same directory as the PS file. Here is code snippet:

Code:
save
        /showpage () def
        /setpagedevice /pop load def
        2.845 2.845 scale
        38 260 translate
        .02 .02 scale
        (logo.eps) run
restore

Works fine, but I am on a unix-based host and the following does not work:

Code:
save
        /showpage () def
        /setpagedevice /pop load def
        2.845 2.845 scale
        38 260 translate
        .02 .02 scale
        (/usr/local/images/logo.eps) run
restore

If I reverse the '/' to DOS-style '\' it is still broken.

Also am seeing odd behavior printing this to a HP LaserJet 1200. When printing directly from Unix, printer light flashes about 5 times and then goes idle. Nothing prints. If I view the .ps file with ghostscript, it prints fine from there.

Thoughts on any of this?
 
You have to escape the slashes. Preface them with another backslash.

I'm not familiar with Unix, so trial and error these examples:

(\\usr\\local\\images\\logo.eps)

or

(\/user\/local\/images\/logo.eps)

This won't print on any printer, because your printer won't be able to reference the path on your host system.

You either: 1) distill the PostScript and then print the PDF or 2) embed your EPS directly in the PostScript.

Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
 

Well, that makes perfect sense. I tend to keep forgetting that PostScript generally gets 'interpreted' in the printer rather than the OS.

Since I am processing large text files within Perl, and then generating PostSCript output that is sent to the printer, I'll have to go with embedding. My goal is try to keep it 'simple' as possible. I know I have some neat ghostscript tools under linux, but the unix I'm working with ships 'standard' with Perl, and no ghostscript. I don't want to open any 'extra' administration duties by having to install and update another utility, so embed it is.

I tried following the directions in thread280-641801
as closely as I could and I, too, run into issues with this working properly for me.

First, I am working today on Windows XP. Othertimes SuSE 9.0 linux. I am using vim to edit the files on a linux Samba share. I then us GSView32.exe v4.5 on Windows XP to view resulting PostScript file, under linux I would use a similar utility. When things are looking good, I print both from my viewing utility and from the linux/unix command line to a PostScript capable printer. So, I am developing under a variety of situations, but the end result must work from unix command line to a printer queue.

My EPS file came from a professional typesetter and I'm not sure if it has a preview or not embedded.

If I omit the EPS embedding, the file prints OK, so I am guessing there is something (a lot of something according to ghostview) amiss or tricky in getting this to work.

Would you mind taking a look at this for me? I could email if you like or email a link to you.
 

Hmm.. I seem to have been able to embed the EPS file with the method of simply inserting the EPS file in place of the 'run' command.

But, dangnabbit, I desire the ability to print this image in more than one location on a given form, and in different sizes.

Using the IDForm execform type of setup gives continues me grief and errors.
 
Sure, post me a link to the EPS, and I'll see what I can do!

Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
 
I know we've been trying various things via email, but I just had this thought...

How about if I load the EPS into printer memory and keep it there (until printer power cycled at least).

Can I then reference the the PS document to load it from there?
 
Hmmm. I don't know how you'd do that, reference the EPS I mean. I know some printers have a hard drive and you can install fonts and EPS files and so forth and reference them, but I'm not sure how you'd reference something in printer memory.

Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top