🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.postscript
2 messages
2 total messages Started by Ciaran McHale Wed, 18 Nov 1992 21:08
EPS files inside procedures or loops
#5728
Author: Ciaran McHale
Date: Wed, 18 Nov 1992 21:08
33 lines
1662 bytes
If I want something (e.g., a logo) to appear on each page of a document
then I could either write the code once for each page, or write a
procedure (which goes into the document's prolog) which does the
necessary and then invoke this procedure for every page. One benefit of
this latter solution is a reduction in the size of the PS file.

But what if the thing I want to appear on each page is an EPS file? Is
it legal to have code like the following:

	/foo
	{
		"some housekeeping before including EPS file"
		... included EPS file here
		"some housekeeping after including EPS file"
	} def

and then invoke foo multiple times in the document? I looked in the Red
Book (the new one for PS Level 2) at the sections which deal with EPS
files and couldn't find any discussion of this.

What I think would prevent the above from working is if the EPS file
contained an image whose data was read directly from "currentfile" (as
is often the case with images).

Comments, anyone?


Ciaran.
-- 
---- Ciaran McHale (cjmchale@dsg.cs.tcd.ie)
\bi/ Department of Computer Science, Trinity College, Dublin 2, Ireland.
 \/  Telephone: +353-1-7021539 FAX: +353-1-6772204
Re: EPS files inside procedures or loops
#5759
Author: Vidiot
Date: Sat, 21 Nov 1992 05:30
43 lines
2455 bytes
In article <1992Nov18.210823.8944@dsg.cs.tcd.ie> cjmchale@dsg.cs.tcd.ie (Ciaran McHale) writes:
<
<If I want something (e.g., a logo) to appear on each page of a document
<then I could either write the code once for each page, or write a
<procedure (which goes into the document's prolog) which does the
<necessary and then invoke this procedure for every page. One benefit of
<this latter solution is a reduction in the size of the PS file.
<
<But what if the thing I want to appear on each page is an EPS file? Is
<it legal to have code like the following:
<
<	/foo
<	{
<		"some housekeeping before including EPS file"
<		... included EPS file here
<		"some housekeeping after including EPS file"
<	} def
<
<and then invoke foo multiple times in the document? I looked in the Red
<Book (the new one for PS Level 2) at the sections which deal with EPS
<files and couldn't find any discussion of this.
<
<What I think would prevent the above from working is if the EPS file
<contained an image whose data was read directly from "currentfile" (as
<is often the case with images).

All of this should work, including images, though that I haven't done
personally.

The part that may get you is that if the included EPS file doesn't place
its definitions into a dictionary, you will run out of dictionary space.
You will have to increase the dictionary size in order to be able to
include the EPS file.

I do a few neat things with groff and I plan on posting a description of what
I do to get it to work.  I've combined the power of groff and the power of
PostScript and done some fancy things.  Soon I plan and providing examples
of what I have done.  Maybe someone else could use what I have done.
-- 
      harvard\                          spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/            INTERNET:vidiot!brown%astroatc.UUCP@spool.cs.wisc.edu
                                   brown@wi.extrel.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads