#EPSF & PPage 2.1
40 messages in this thread
% PPage Users,
% See if you can get this EPS file to load into PPage 2.1.
%!PS-Adobe-2.0-EPSF-1.2
%%Creator:Allory Deiss
%%Title:ZIP
%%CreationDate:6/20/91 9:39 AM
%%DocumentFonts:Courier
%%BoundingBox:0 -45 324 0
%%EndComments
gsave
zipDict 20 dict def
zipDict begin
ZIP (10009) def %enter either 5 or 9 digit zip code as text string
bdef {bind def} bind def
_R {.25 sub round .25 add} bdef
_r {transform _R exch _R exch itransform} bdef
l {_r lineto} bdef
m {_r moveto} bdef
w {0 _r pop setlinewidth} bdef
tall {0 0 m 0 9 l 3.45 0 _r translate} bdef
short {0 0 m 0 3.6 l 3.45 0 _r translate} bdef
39 -27 translate
.75 w
1 {short short short tall tall} bdef
2 {short short tall short tall} bdef
3 {short short tall tall short} bdef
4 {short tall short short tall} bdef
5 {short tall short tall short} bdef
6 {short tall tall short short} bdef
7 {tall short short short tall} bdef
8 {tall short short tall short} bdef
9 {tall short tall short short} bdef
0 {tall tall short short short} bdef
ZIP length 5 eq ZIP length 9 eq or
{tall
0 1 ZIP length 1 sub {ZIP exch 1 getinterval cvn cvx exec} for
0 0 1 ZIP length 1 sub {ZIP exch 1 getinterval cvi add} for
10 mod dup 0 ne {10 exch sub} if 1 string cvs cvn cvx exec
tall stroke}
{/Courier findfont 9 scalefont setfont 0 0 m (Zip Code must be either 5 or 9 d
igits) show}
ifelse
end
grestore
% It loads fine into Pagestream, but not into PPage. It generates the
% postal barcodes you see on envelopes.
% Chris
Chris:
Change the line:
%!PS-Adobe-2.0-EPSF-1.2
to…
%!PS-Adobe-2.0 EPSF-1.2
(In other words, take out the third hypen).
Dumb, eh?
Gary
– Mirror Image Prod. (416) 495-7469, via WHAP!
>Change the line:
.0-EPSF-1.2
.0 EPSF-1.2
Gary, am I losing it, or those two lines identical?
– Whapp!ng from the North Coast Michael
Mike,
The line
%!PS-Adobe-2.0-EPSF-1.2 should read (according to Gary)
%!PS-Adobe-2.0 EPSF-1.2
remove the third hyphen.
Chris
gotcha!
– Whapp!ng from the North Coast Michael
Mike,
I removed that one little hyphen and PPage accepted the
EPSF! Son of a gun! The other DTP programs didn't seem to mind that it
existed! Strange, huh? It is a nice little EPSF file. Does a nice job of
making the postal barcode. You know, I knew a designer who worked for an ad
firm that had no idea what those bars meant. When they did an envelope
return mailer for a company, they would simply cut and paste the barcode
from another previous job, or take it off of another envelope laying around
their office! He was shocked when I showed him this piece of code. Never
had an inkling that it was the zipcode of the addressee! Ha! Oh yeah, he is
an exclusive macintosh user, an excellent artist, but very narrow in his
use of a computer.
Chris
Chris,
I own PageStream and I know I'm a rookie with it (and DTP), but I
haven't got a clue as to what that thing is you posted (the Scriptish
looking critter called EPSF).
Can you give me a hint, I'll even look in the manual again 🙂
Paul
–pt–not seattle– 😉
Paul:
That is an ecapsulated postscript (EPS) file. Postscript is a page
description language that is written in ascii… which is why it 'almost'
looks like english 🙂 The EPS Chris uploaded is a graphic file. About a
third of the way down the code (I don't have in front of me) there is a
line that sometihng like zip(10009)def. If you put a zip code in that line,
and import this EPS file (IMPORT/GRAPHIC), the file will print a US Post
Office bar code definig the zip code, when output to a postscript device.
– Whapp!ng from the North Coast Michael
Paul
PostScript is a page-definition language, which some printers are capable
of turning into a page image and then printing. They're mainly laser
printers (since they already basically generate a full page image before
committing it to paper).
The language was developed by Adobe, and is a fairly universal standard for
interchanging documents for printing. Indeed, it is a complete programming
language, with all the things you would expect (mathematical functions,
strings, subroutines, if..then..else constructus and much much more) … so
much so that there is even a Mandelbrot generator program around written in
PostScript!! However, it is a rather quirky (and, of course, somewhat
specialised) language which is capable of redefining its own operators and
is heavil stack oriented (just like FORTH).
If you used PageStream to generate a PostScript output onto an IBM-format
disk (using one of the several available Amiga utilities) you could take it
along to a printing bureau and print it to a high quality Lino machine, or
you could print it on a friend's laser printer, or you could run it through
POST on your Amiga and print it to a dot-matrix printer. You'd get the same
output whichever way you did it, only the quality would improve as you went
to higher quality machines.
You could perhaps generate an illustration or company logo in PostScript,
and it would be nice to be able to include this in another document …
that is where Encapsulated PostScript (or EPS) comes in (EPSF just means
EPS file).
It is a set of structuring conventions to identify the EPS data and also to
give extra information that the application would need (such as the size of
the image), and it is also a set of basic rules thta need to be adhered to
in order not to mess up the rest of the page on which the logo or
illustration is printed.
You can import EPSFs into PStream and ProPage, but neither of them will
generate an image on the screen, nor will they print EPSFs to a
non-PostScript printer.
[ MORE ]
[ continuation ]
That's because they would need to have complete PostScript interpreters
built in, and they don't. Instead, all they do is note the EPS code, and
include it without modification in the final PostScript output.
Mike (Whapping from the UK)
Mike:
Now what would really be neat would be for a future version of either PgS,
or PPage to license the post.library and distribute it (along with the Post
program itself) with their respective programs, and incorporate it's use to
display EPS files within the program!
-Mike Schiller
In sunny Fort Lauderdale
Mike:
Funny… I was thinking the same thing after Mike Todd's last remarks!
hmmm… a PostScript Page Preview maybe?
Of course, with multitasking, you really already have that ability now!
(think we have enough 'Mike's' in this thread?<g>)
– Whapp!ng from the North Coast Michael
Michael:
I wasn't refering to a Postscript page preview, but rather the ability to
preview EPS drawings imported into PPage (rather than just having a box
marked EPS or whatever it is that PPage does now.
-Mike Schiller
In sunny Fort Lauderdale
However utilities like Pixel Script, or Saxon Script, should do the trick,
when it comes to printing EPS pictures.
– Well Whap! Me Silly….
Chris:
How about uploading that short Postscript program to a permanent archive in
the DTP library here, with some comments on how to use it? 🙂
– Whapp!ng from the North Coast Michael
Michael, That EPSF file can be found in the Adobe Forum's Postscript
Library. If you take the message I posted and save it without the CIS
header it is the exact EPSF code. It should work fine. Look in Adobe's
library though, bro;ZIPCOD.TXT I think is the file name.
Chris
Thanks Chris.
– Whapp!ng from the North Coast Michael
Michael,
Since you are using Whap!, you already have the program. Simply keep it,
then go into your Amigauser.KPT file and trim off all the garbage with a
text editor, and then save it out as a different file. As for directions,
you manually insert the Zip code into the file. Then import the file as an
EPS graphic into Pagestream. You will need a Postscript printer, or a
Postscript interpreter, to print it.
– Well Whap! Me Silly….
Mike,
>Change the line:
0-EPSF-1.2
0 EPSF-1.2
^
|_______ Notice the missing Hyphen in this line, where there is one
in the line above?
I don't think you lost it, you just didn't find it. <g>
– Well Whap! Me Silly….
Thanks Alex
– Whapp!ng from the North Coast Michael
Gary,
That's it! just an extra hyphen? Why does Pagestream, QuarkXpress
and Pagemaker all load it without a problem? Sheessh, where is Gold Disk's
error checking going? I'll try it. It is a neat little piece of EPSF code
huh? It works great (when it works)
Thanks,
Chris
Actually, the PostScript document structuring conventions (from Adobe)
stipulates that the header comment be of a precise form:
%!PS-Adobe-2.0 EPSF-1.2
i.e., without the hyphen (the version numbers are the only thing that are
alowed to change). The fact that PPage doesn't work when there is a hyphen
is simply because it is following the guidelines very closely. It is the
other programs that are being "loose" about it.
James Bayless
New Horizons Software, Inc.
Chris … the fact that PStream, QX and PMaker accept it is actually a
major failing on _their_ part! Gold Disk is doing it right, since the EPSF
standard requires that line to be:
%!PS-Adobe-1.0 EPSF-2.0 (or -3.0)
In other words, no hyphen. If there _is_ a hyphen, then it isn't really an
EPSF-compliant file and teh other packages _ought_ to reject it.
The problem is, if many packages start to be sloppy like this, then those
writing little routines, like that bar-code program, will be lulled into a
false sense of security since the program will work on the packages that
they use.
However, when you try to load it into a package which checks correctly, it
won't work. So, a gold star for Gold Disk … and into the shame-house for
the rest!
Mike (Whapping from the UK)
Mike,
I see your point. Yeah, Gold Disk is following the code to the letter, I
quess. I'll have to let them know what I found out.
Thanks,
Chris
No, no, no. If we followed the standards to the letter, a lot of commercial
clip art and fonts would NOT work with PageStream. In fact, there are
hundreds of commercial PostScript fonts which do not follow the specs and
would not work with 2.0. People tell us "there is a bug in PageStream
because it won't print my commercial font" or "there is a bug in PageStream
because this graphic won't import and I paid $200 for the package." These
aren't bugs in PageStream, they're bugs in the graphics and fonts.
Everytime we 'fix' PageStream to accept these, we make exceptions for
quirks in other people's data. GD probably just hasn't seen this particular
version of EPS yet or else they would add it, too. That's the way the thing
works. That's why there is a fontequiv file (wait til you see how long it
is with all the ImageClub type fonts added, and no, the fontequiv length is
not important for speed in 2.2).
SL
It's because of just this approach that we have the problem! Slackness in
implementation in one application propogates through subsequent
applications until we have the situation that every application effectively
has its own version of the "standard", and we can no longer transfer
between applications.
One of many examples is the character-fill rule used in PostScript.
PageStream fails to implement this properly … but, clearly, so do other
packages since there are several fonts which fail to print correctly to a
proper PostScript device, yet PageStream prints them correctly!!
Conversely, there are some fonts which do not print correctly on PageStream
but which work fine on a PostScript printer.
I have a gut feeling (no more) that a lot of fonts get blamed for not
sticking to the standard when, in fact, they do … but they do odd, yet
legitimate, things within the standard (after all, several aspects of
PostScript Type-1 fonts are suggestions and recommendations, not
imperatives). It's then very easy to blame the font itself when it is
actually the failing of the importing package.
I would certainly like to hear of some specific specs that are broken
within the fonts that you refer to … what is it that these fonts (or
whatever) are doing that is out of spec?
Despite the above, I do appreciate the need to be able to use all these
outside fonts and clip-art, and it is important in a commercial world so to
do.
Mike (Whapping from the UK)
Mike (and SL and everybody else…)
I'm sure I jumped into an argument on this before, but I might as well do
it again…
Having written programs which work with Type 1 fonts, I can state
categorically:
UNLESS YOU INCORPORATE A FULL POSTSCRIPT INTERPRETER INTO YOUR TYPE 1
MANIPULATION SOFTWARE, YOU HAVE NO ONE TO BLAME FOR IT NOT WORKING BUT
YOURSELF!!!! (This goes for me too!)
What no one here seems to want to admit is that Type 1 fonts are PostScript
programs and as such, are intended for use with PostScript interpreters. If
I write a program that dissects them, then I have to deal with them the
same way a PS interpreter does, or I'm asking for trouble. Programs like
PageStream DO NOT interprete the font like a PostScript device does; they
parse it according to THEIR set of rules, expecting it to follow certain
guidelines outlined by Adobe and based on a finite # of test fonts. More so
than with most languages, PostScript allows a great deal of flexibility in
its syntax. If SL and myself, and no doubt a number of other developers,
have taken it upon ourselves to "short-cut" our way through Type 1 fonts,
then we should at least take the blame when they don't always work out. The
solution is simple: write a parser tested on every Type 1 font in existance
or write a PostScript interpreter. Those are the only ways to absolve
ourselves of this responsibility.
Gary
– Mirror Image Prod. (416) 495-7469, via WHAP!
I don't think I'd go that far… Adobe does state that Type 1s have a
limited set of valid commands. A good Type 1 parser must be able to handle
all those useful dictionary elements, too.
John:
I suppose I probably flew off the handle a bit on that one (I do that,
don't I?), but to be perfectly honest, I find it a little frightening when
SoftLogik says things like "So and So's commercial fonts don't work in
PageStream, so there must be something wrong with the fonts"… I have a
pretty good idea how they parse the Type 1's and find it ridiculous to
suggest a legitimate Type 1 font which outputs to a licenced PostScript
device is "buggered" because it doesn't work in a decryption routine
written by someone who'se only source for Type 1 information is undoubtedly
the Black Book. It's probably not the actual eexec code it's choking on
anyway. It probably falls over when it runs into double spaces or
something.
Oh, BTW, about parsing those useful dictionary elements? I just throw 'em
away…:)
Gary
– Mirror Image Prod. (416) 495-7469, via WHAP!
Having written more than one or two pseudo-PostScript parsers, I can safely
say you don't need to do it all in order to get the job done to commercial
satisfaction. In the Adobe Illustrator parser I did for Harvard Draw on
the PC, I managed to get it loading ten times faster than our competitors.
I used similar techniques on the Type 1 code I've done now. If you can
point Soft Logik at the exact mistake they're making, why not tell them?
Or upload the font, I'd like to see if my parser can handle it. 🙂
Gary, you are absolutely right here and it is the basis of the point I was
making. The only way to support PostScript fonts is to have a PostScript
interpreter.
However, Type-1 fonts use a very small subset of the PostScript language
and they stick to a fairly simple set of rules. In addition, each chardef
is more or less self-contained, and doesn't require the generation of a
state model to know exactly what is going on.
Thus, it isn't that difficult to write software that works with Type 1
fonts provided that the author has a good understanding of where the
limitations will be. A good example is the fill algorithm used by
PostScript; a rendering program needs to understand the even-odd rule and
to do the necessary analysis of the character to render it correctly.
PageStream is one program which doesn't do this … ProDraw fonts also
suffer the same problem.
This fill problem is a very good example of this sort of thing since, 99.9%
of the time, the fill rule used by PageStream (and ProDraw) actually works
just fine because most characters have any central areas within a character
"empty". But, some fonts appear to have their internal and external paths
following in the same direction and that means that the inner area is _not_
empty (the total character fill spills into it). These fonts don't print
correctly on a proper PostScript printer, but they do print correctly on
PageStream and so on! This is a classic example of why programs should
conform to the rules _properly_.
Mike (Whapping from the UK)
Mike:
I'm almost postive that PDraw does the following with type fills (though I
could be way to left feild on this one): If a character is made up 2 paths
(let's say the letter "O", with and inside path and an outside one), then I
believe PDraw simply draws both paths, fills them and then XOR's them. This
is what it looks like it doing with compound objects, and characters ARE
brought in as compound objects. This could be why it falls on it's face
with certain fonts (that is, ones that have their paths crossing each
other). This, as you know, is NOT how PostScript does it. But the way
PostScript does it is far more processor intensive, I believe, than simply
saying "fill this, fill this and slap 'em together!". Yet another short-cut
causing potential problems. Where will it all end? 🙁
Gary
– Mirror Image Prod. (416) 495-7469, via WHAP!
If you don't like PgS accepting less than standard fonts, we can easily
create a version for you which will work with little but Adobe brand fonts.
{_And a good deal of EPS clip art won't work either. Forget ever using
Image ~rClub fonts.
I don't know any specifics, and don't really have the time to research
them. Sorry. But we add the ability to accept less than perfect files so
you don't have to worry about it when you buy clip art. Imagine asking the
mail order company if the fonts adhere to the PS standard. You'll hear
"they work with PageMaker", which is true, because PageMaker, Quark Xpress,
Ventura, DesignStudio, ProPage and everybody else does the same thing. This
is the way the world works.
SL:
In defense of Mr. Mike:
The purpose of software "standards" is to ensure effortless interchange of
information. How can you possibly condone an alteration to a standard by
simply saying, "everybody does it"? Would it be okay for me to create a
paint program that outputs IFF pics with a structure named "GARY" instead
of "FORM"? By your rational, it would be as long as everybody agreed to
check for both "GARY" and "FORM". And then where would it end? It would end
up like the Mac, with its 22 million different picture file formats. I
understand why you might choose to accept non-standard information when
parsing a file's information (it makes you look good, for one thing). What
I don't understand is why you don't seem to see how ultimately destructive
it is…
Gary
– Mirror Image Prod. (416) 495-7469, via WHAP!
Gary: I agree it is better to stick to a standard. But if we do that, we
get calls from users asking why their pictures from so and so program don't
work, and since they've used that program for 2 years, they don't believe
us when we tell them it's not our fault. If we can add a patch to tolerate
one little thing with those picture files, it doesn't hurt the user, it
helps them. Not a big deal. How did we get onto this anyway?? 🙂
BTW, don't quote me on PS stuff. I'm a "user". (Programmers pronounce that
with emphasis on the U.)
Mike
Chris:
I'm afraid I'll have to agree with James on this one (in a way…:); Gold
Disk is following the format as outlined by Adobe, and the program that
created the EPSF file is not. The one thing Gold Disk is VERY good at is
sticking to Adobe's recommended formats. Unfortunately, not everyone
follows the recommendations to the letter and it doesn't make a difference
to the PostScript interpreter, as this is a commented line. So what happens
is that Gold Disk ends up looking stupid, even though they've followed the
guidelines to the letter. Look for other parsing problems in the future,
with "%%BeginFont" and "%%DocumentFonts" and other "standard" Adobe comment
fields, that people feel comfortable with formating any way they want.
Yeeeesh! Ain't PostScript just the dreamiest?
Gary
– Mirror Image Prod. (416) 495-7469, via WHAP!
Gary,
I'm finding out that postscript is just that… the dreamiest! B^)
Maybe I'll understand it better someday (not holding breath)
Chris
Chris
Be warned that CompuServe has unceremoniously stripped all the leading
slashes from each line of that EPSF! As it stands, it won't work at all and
will generate error messages.
Putting the /'s back in where appropriate (for those who can't work it out,
all the lines with "def" ot "bdef" in them should start with "/") makes it
work.
Mike (Whapping from the UK)