Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > EPS writing quidelines
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 15th February 01:41
gordan sikic
External User
 
Posts: 1
Default EPS writing quidelines



Hello,

I am C++ software developer and I've got a task of making export of
technical drawings to EPS format. I have successfully done it, but
during that work, couple of questions arose:

* I do not have PS capable printer, and all checks are done using
GhostScript suite. Should I be aware of some (unseen) problems? I have
strictly followed EPS do***ent structure guidelines.

* I have made level 3 EPS files. Should I be worried about that fact?
Are there any printers out there that do not support it?

* Amount other things, I had to cope with transparent (bitmap tiled)
patterns. I have solved it, but using "Type 4" image dictionaries within
"Type 1" PatternType, following the guidelines from example files from
Adobe's url. I'm bit worried because it is in collision with statements


* Amount of data I'm exporting is huge. Number of distinct points easily
reaches couple of millions, and number of graphical objects reaches
couple of thousands, up to a million. As a consequence, exported EPS
files frequently have size of several MB. Therefore I have implemented
the following: after writing header entries, I made following construction

currentfile /ASCII85Decode filter /FlateDecode filter run

followed by flated data in ASCII85 format (and appropriate terminator).
Everything works nice in GS, and the file size is dropped up to 5-10
times. Is it legal (or moral?) to use such a construction in EPS files?

Thanks in advance,

Gordan Sikic

e-mail: gordan dot sikic at inet dot hr
  Reply With Quote


  sponsored links


2 15th February 01:41
alex cherepanov
External User
 
Posts: 1
Default EPS writing quidelines



And spoil expensive media. I've heared about a PostScript gravestone
engraver. Many people prefer to get an error to abort the job.
  Reply With Quote
3 15th February 01:42
gordan sikic
External User
 
Posts: 1
Default EPS writing quidelines


Hi,


Yes, I know that The problem is that I got no specific requrements
for support of Level 2, nor access to any PS printer. My question should
have been stated as: Should I go and add support for Level 2 as well ?
(you already answered yes)

Yes you are right, it is PostScript reference manual, 3rd edition, under
Colored Tiling Patterns. The "connection" is as follows: reference
manual states that image dictionaries can not be used in /PaintProcedure
while defining Colored Tiling patterns, and in PS files (programs) I
downloaded from Adobe, I found exactly oposite (Type 4 image
dictionary). It's the root of that question.

Or,

(this came to me right now, like the falling apple)
In the reference they stated that when pattern colorspace is in effect,
I can't use dictionary form if image? It would make sense. In that case
I misunderstood reference manual.

You are right again, I have made a decision to use Level 3 capabilities,
and I did

I have taken care of this, most paths have up to 200-300 points, not
more. On the other hand, I have no controll over images, which may
become huge (for example A2 drawing with background image spread from
margin to margin...) I implemented "image resolution controll" i.e. I


any resolution controll (and without any compression), max file size I
got was about 180MB. It was mostly due to 24bit RGB images within EPS file.

I'd also like to thank you and Alex for your time and help.


ciao,


Gordan Sikic

e-mail: gordan dot sikic at inet dot hr
  Reply With Quote
4 15th February 01:42
helge blischke
External User
 
Posts: 1
Default EPS writing quidelines


As for the images, similar restrictions apply as Aandy pointed out for
paths.
To account for limited printer memory, you could tile or stripe the
images
(as usually is done with TIFF images and - by QuarkXpress - for
bitmapped images
in PS output).

Helge


--
H.Blischke@srz-berlin.de
H.Blischke@srz-berlin.com
H.Blischke@acm.org
  Reply With Quote
5 15th February 01:42
quite
External User
 
Posts: 1
Default EPS writing quidelines


Yes, but there can be no legitimate use of an image during the paint
proc of a coloured pattern...

Alex's point is a good one; it isn't always best to succeed. Opinions
(and workflows) differ. Perhaps best is to paint something clear on
the page, THEN raise an error. Many error handlers will print the incomplete page.


The PostScript language does not require a printer to hold entire
images in memory. It can be done with only a fixed sized buffer,
though some implementations might choose to store the whole image.
There is some risk here.
----------------------------------------
Aandi Inston quite@dial.pipex.com http://www.quite.com
Please support usenet! Post replies and follow-ups, don't e-mail them.
  Reply With Quote
6 15th February 01:42
lee sau dan
External User
 
Posts: 1
Default EPS writing quidelines


Gordan> Yes, I know that The problem is that I got no specific
Gordan> requrements for support of Level 2, nor access to any PS
Gordan> printer. My question should have been stated as: Should I
Gordan> go and add support for Level 2 as well ? (you already
Gordan> answered yes)

It depends on how your EPS insertions would EVENTUALLY be displayed or
printed. If the displayer (e.g. ghostscript) or printer do not
support Level 3, then your EPS won't show up correctly in the best
case, or cause the displaying/printing to be aborted in the normal
case, or case the computer/printer to hang in the worse case. (If the
printer hardware were damaged by this, sue the manufacturer!)

Since ghostscript still does not support Level 3 completely (am I
right) and most DEPLOYED printers can't handle Level 3, chances are
that your EPS diagrams won't "work", from the end-user point of view.

If you still think it is a good idea to produce something that "won't
work" in most situations, then go ahead and use Level 3. I would
recommend staying with Level 2, unless you're going to use some Level
3 features (e.g. transparency, gradient fill) that are really very
very hard to emulate (satisfactorily) in Level 2.


and ghostscript. (The latter is important, as you can use ghostscript
to convert it to almost anything else.) The best compatibility is
thus achieved. Yet, when I'm fine-tuning a PS file to be sent to a
printer in 5 minutes (e.g. adjusting US-Letter-formatted pages to A4
page size), I don't refrain from using the handy features from PS2,
such as <<...>>.


Gordan> You are right again, I have made a decision to use Level 3
Gordan> capabilities, and I did

Didn't you say you use ghostscript as a previewer as you develop your
PS code? Does ghostscript support Level 3 fully already?


--
Lee Sau Dan §õ¦u´°(Big5) ~{@nJX6X~}(HZ)

E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee
  Reply With Quote
7 15th February 01:42
gordan sikic
External User
 
Posts: 1
Default EPS writing quidelines


Hi Lee,

I am not "PS guru"

I used /FlateDecode filter and Type 4 dictionary images in my files,
and everything showed correctly in ghostscript (newest version). When I
say correctly, I mean that I compared view from the GS to the view form
the program I was exporting form.

If you want, I may mail you small examples that worked for me...

I really need transparency (in patterns), it proves that there are many
technical drawings that relay on filling some area with some kind of
transparent, color, tiled, bitmapped pattern. Using image dictionary
(type 4) within PaintProc proved to make correct results, while examples
from PS reference (examples used /"path construction
operators"/stroke/fill) were different from pictures in PS
reference(stars were wrongly filled)


ciao,

Gordan
  Reply With Quote
8 15th February 01:42
quite
External User
 
Posts: 1
Default EPS writing quidelines


Be sure you understand the difference betwen a coloured and uncoloured
pattern. I can say this with some emphasis as I regularly mix them
up, and did so on this occasion.

Coloured patterns MAY set colour, uncoloured patterns MUST not and
inherit a colour when they are used. Ironically a coloured pattern
might paint black and an uncoloured pattern might be used to paint
red.

It is of course an uncoloured pattern that has no need for image
dictionaries in the PaintProc.

So, now I reread the paragraph you refer to with my brain engaged, I
see it is not about PaintProc at all.

It is saying that you cannot set the colour space to a pattern (of any
kind), and then use the image operator with its dictionary form.

Let's think about what that would mean.
(a) a coloured pattern and image. You would have image samples to be
applied and colours in the pattern. How could the samples be applied?
This means the samples are unnecessary (there are no alpha channels)
and the on/off function for the pattern that you may seek can be
achieved with an imagemask.
(b) an uncoloured pattern and image. This sounds theoretically
possible. The colour come from the image samples, while the decision
whether to paint a point could come from the pattern. My reading is,
however, that it is not allowed.

In terms of PaintProc, a coloured pattern may freely use the image
operator, while an uncoloured pattern may not use it at all. (The
prohibition is ******** in a note on page 215).
----------------------------------------
Aandi Inston quite@dial.pipex.com http://www.quite.com
Please support usenet! Post replies and follow-ups, don't e-mail them.
  Reply With Quote
9 15th February 01:42
gordan sikic
External User
 
Posts: 1
Default EPS writing quidelines


Hi AAndi,

Thanks for your elaborate reply. This was exactly the part I was
missing. This paragraph cleared my misunderstanding of PS reference.


greetings,

Gordan
  Reply With Quote
10 25th February 18:42
gordan sikic
External User
 
Posts: 1
Default EPS writing quidelines


actually, it was this paragraph, I referred in my last post

Gordan
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666