🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.postscript.programming
7 messages
7 total messages Started by Vahan Babakhanian Thu, 24 Jul 2003 01:03
newbie in (E)PS - need a sample and impuls
#1091
Author: Vahan Babakhanian
Date: Thu, 24 Jul 2003 01:03
40 lines
2163 bytes
have to try to imitate and generate image files online (just a simple background, 1-2 images and few lines of text). I can easily do that in jpg format. the task is to get EPS.

question 1 - Code

this code from PS 800 pp. manual, Appendix H - does not work use ASP script, generate file and write it to the disk with eps extension, later trying to preview it

s1="%!PS-Adobe-3.0 EPSF-3.0"
s5="%%BoundingBox: 5 5 105 105"

s10="20 setlinewidth"
s11="40 60 moveto"
s12="0 90 rlineto 90 0 rlineto 0 -90 rlineto closepath"
s13="stroke"

ss = s1 &s5 &s10 &s11 &s12 &s13

Dim fso, f1
Set fso = CreateObject("Scripting.FileSystemObject")
eps0="eps_h1.eps"
eps1="c:\inetpub\wwwroot\test\" &eps0
Set f1 = fso.CreateTextFile(eps1, True)
f1.WriteLine(ss)
f1.Close

response.write(eps0 &"

")

I tried also to put at the end of each line "0A" - no result.
image i was trying to preview by Adobe Illustrator and also by GSview 4.1

question 2 - Viewer

is there any way to see eps image right in the browser (like we can preview jpg files)?

Photoshop opens this file from above code as an empty file. when trying to open it asks properties (RGB, grayscale, size, resolution, etc.) why?

is there any free EPS viewer? (i download few with EPS mentioned among available formats, but they do not work)

thanks for advices
Re: newbie in (E)PS - need a sample and impuls
#908
Author: Gunnar Fing Blodgett
Date: Mon, 28 Jul 2003 20:44
17 lines
1479 bytes
Vahan

I am not sure what language you are creating this in. If I create the following text file as "test.ps", Photoshop opens a thick-lined box as expected.

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 5 5 105 105

20 setlinewidth
40 60 moveto
0 90 rlineto 90 0 rlineto 0 -90 rlineto closepath
stroke

2) If you want a free viewer for PostScript, try GhostScript, possibly with the GhostView addition. You can find them at <http://www.cs.wisc.edu/~ghost/>.

3) This one is for Aandi: I don't understand what's wrong with his bounding box. It fits the graphic. He's just using integers instead of floats to define the positions.

Gunnar
Re: newbie in (E)PS - need a sample and impuls
#909
Author: Aandi Inston
Date: Mon, 28 Jul 2003 22:19
5 lines
1102 bytes
The bounding box didn't seem to me to fit the graphic. Notice the
graphic uses rlineto, not lineto. So ignoring the effect of the line
width (which you can't), the box is from 40,60 to 130,150...

Aandi Inston
Re: newbie in (E)PS - need a sample and impuls
#912
Author: Vahan Babakhanian
Date: Wed, 30 Jul 2003 00:28
8 lines
1871 bytes
Thanks for advices. Unfortunately only later I understood, that I have to use Illustrator to play with (E)PS files. GhostView - probably not for my nerves. And also another moment: I had an Illustrator only on another PC in the LAN, so I tried to work with it. It worked only for simple PS scripts.
Now I installed trial version and so far am OK.
Here is my another question.
I use ASP (because all my huge application is in this script). I have a very simple TEMPLATE - a white square with few text fields in fixed positions. I took an existed EPS file for concrete template, divided it into 3 parts (beginning, enging, which never change, and middle part with variable text fields). Now I easily generate middle part from my ASP putting values for each text field. Than I merge all 3 parts into one new and save as a new file. Unfortunately Illustrator is unable to parser it.
Q #1: is this method "normal" to generate EPS files?
Q #2: is there any Log for errors and warnings of Illustrator as PS Script parser/editor. How can I locate the error that have in my "small" EPS file with >3000 lines?

thx for advices
Re: newbie in (E)PS - need a sample and impuls
#914
Author: Aandi Inston
Date: Wed, 30 Jul 2003 06:50
25 lines
1806 bytes
>Q #1: is this method "normal" to generate EPS files?

It sounds reasonable.

>Q #2: is there any Log for errors and warnings of Illustrator as PS Script parser/editor. 

No. Illustrator is a very bad tool for this purpose. Firstly, there
are no error reports. Secondly, it does not handle the entire
PostScript language.

You should test EPS files by using them as intended:  PLACE them.
Then PRINT them to a PostScript printer; or Distill.  If that works,
they are valid.  If not, you have a PostScript error.

You can use Illustrator to Place, but be sure the LINK box is ON to
stop Illustrator trying to interpret.

On the other hand if your design aim is to make EPS files that
Illustrator CAN open, because that is your project requirement, you
have a difficult task. You have to first make valid EPS, then discover
(undocumented) the subset of PostScript that Illustrator understands -
and bear in mind it changes at each release.

Aandi Inston
Re: newbie in (E)PS - need a sample and impuls
#913
Author: Vahan Babakhanian
Date: Wed, 30 Jul 2003 06:55
1 lines
910 bytes
very interesting. not software but hardware (printer) parser of a script... i will try, but first will buy a couple of boxes of paper :)
Re: newbie in (E)PS - need a sample and impuls
#916
Author: Aandi Inston
Date: Wed, 30 Jul 2003 08:26
5 lines
1163 bytes
Acrobat is generally a better tool than a printer, if only because
error messages are more visible. But ultimately, yes, PostScript is a
language intended for hardware, and that's what has to work.

Aandi Inston
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