PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : ps to eps: Bild leer?



hpb
27-07-2005, 16:57
Hallo,
ich erstelle die Grafiken für mein Latex-Dokument mit MS Visio. Wenn ich die Grafiken mit einem PostScript-Drucker als Datei ausgebe (Datei drucken--> PS-Drucker von HP) und mit GostView in EPS (PS to EPS --> autmatically calculate bounding box) umwandele, dann nimmt die Grafik zwar Platz im Dokument ein, ist aber nur eine weiße Fläche (deshalb habe ich in meinem Beispeil die fbox drum herum gesetzt).

Ich habe euch das ganze mal als minimales Beispiel angehängt.
Ein Bild (logo.gif) als Ausgangspunkt. Mit dem PS-Drucker ausgedruckt lässt es sich mit ghostview wunderbar anzeigen. Nach der Konvertierung in eps enthält der erzeugte dvi file die Grafik nur als leere weiße Fläche :rolleyes:

Was mache ich falsch?
Danke für eure Hilfe!

P.S.: Was mir noch aufgefallen ist: Ich muss die Endung .eps an die Grafik hängen, damit Latex korrekt kompiliert. Normalerweise sollte es doch auch ohne gehen, oder? (Ist die Grafik fehlerhaft?)

fireglow
28-07-2005, 15:59
hallo hpb,

ich habe mich mal rangemacht und dein minimalbeispiel getestet.

hat bei mir auch nicht funktioniert. beim einbinden gab er mir die fehlermeldung no boundingbox could not determine size.

also habe ich mir das .ps file angeguckt, bis dahin ist alles in ordnung.

bei der umwandlung in das .eps file muss bei dir ein fehler auftreten.

teshalber habe ich mit dem perl programm ps2eps das ps in ein eps gewandelt, das hierbei entstandene ergebnis ist wunderbar.

bei meiner recherche im internet habe ich herausgefunden, dass gsview mit ps2epsi arbeitet und dabei fehler auftreten können, dies scheint wohl der fall zu sein. wenn ich dein ps mit ghostview in ein eps wandle bekomme ich auch einen fehler


PS to EPS

In general, it is not possible to convert a PostScript file to EPS. However, many single page PostScript files can be converted to EPS by changing the first line of the file to
%!PS-Adobe-3.0 EPSF-3.0
and then adding or fixing up the %%BoundingBox comment.

EPS files are commonly used for inclusion in other documents and for this reason require the bounding box comment:
%%BoundingBox: llx lly urx ury

where llx, lly, urx and ury are integers giving the x and y co-ordinates of the lower left and upper right corners of a bounding box which encloses all marks made on the page.

When used incorrectly, the PS to EPS command can produce PostScript files with incorrect DSC comments. Such a document will cause problems when you try to include it inside another document.

To convert a PostScript file to EPS, the original file must be a single page document. If the document contains DSC comments and is multi page, extract the desired page with File | Extract. If the document does not contain DSC comments, you will need to edit the file by hand to extract the desired page.

EPS documents must not use any of the following operators:
banddevice clear cleardictstack copypage
erasepage exitserver framedevice grestoreall
initclip initgraphics initmatrix quit
renderbands setglobal setpagedevice setpageparams
setshared startjob letter note
legal a3 a4 a5

The following operators should be used with care:

nulldevice setgstate sethalftone setmatrix
setscreen settransfer setcolortransfer

It is your responsibility to make sure that the above requirements are met.

To test if a document contains any of the above operators, select Options | EPS Warn and then Open the desired document. After the page has been displayed, Close the document and then display the Ghostscript messages with File | Show Messages. If any of the above operators have been used you should see lines like:

Warning: EPS files must not use ...
If you find these warnings then do not use PS to EPS. Remember to turn off EPS Warn afterwards.

A document must be displayed before PS to EPS is used.

For documents without DSC comments, PS to EPS allows a bounding box to be specified, then writes out an EPS file consisting of an EPS wrapper around the original document.

For documents with DSC comments, PS to EPS will change the first line of the file to

%!PS-Adobe-3.0 EPSF-3.0
then allows the %%BoundingBox comment to be changed or added.

For EPS documents, PS to EPS allows the %%BoundingBox comment to be changed.

PS to EPS does not clip the document to the %%BoundingBox. To do so would require changing the PostScript code itself. PS to EPS only changes the DSC comments.

If Automatically calculate Bounding Box is checked, GSview will calculate the bounding box from the non white pixels. If unchecked, you get to choose the bounding box by clicking at the left, bottom, right and top.

PS to EPS does not add a preview to a document. If you want a preview you add it with Edit | Add EPS Preview after first creating an EPS file with a correct %%BoundingBox.

hpb
28-07-2005, 17:25
perfekte Antwort! Danke!

fireglow
29-07-2005, 07:36
gerne doch