Runtime Exec und Ghostscript funktioniert nicht

Hallo,

mit Java SDK 1.4.9 wird mit Runtime.exec

proc = Runtime.getRuntime().exec(command, environment);
new InputStreamHandler(inBuffer, proc.getInputStream());
new InputStreamHandler(errBuffer, proc.getErrorStream());
result = proc.waitFor();

der Befehl

C:\gs\gs8.61\bin\gswin32c.exe -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 „-sDEVICE=tiff32nc“ -dTextAlphaBits=4 -dGraphicsAlphaBits=4 „-r72x72“ „-sOutputFile=D:\temp\466405a0-a023-4220-ad0f-8eaf3f35dbe9\33f9ca1d-b6a8-4f3a-bebb-1a9187d02427.tiff“ „-fD:\temp\466405a0-a023-4220-ad0f-8eaf3f35dbe9\33f9ca1d-b6a8-4f3a-bebb-1a9187d02427“

ausgeführt, wobei das Source-Dokument ein PDF ist.

Das funktioniert auch, jedoch fehlt im TIFF ein großes Bildelement aus dem PDF.

Jetzt kommt´s. Wenn ich denselben Befehl in der Kommandozeile ausführe, wird in dem TIFF das Bild korrekt dargestellt!?

Hat jemand eine Idee, worin der Unterschied zwischen der Java Runtime und der Kommandozeile liegen könnte, die dieses seltsame Phänomen verursacht?

Danke,
Jochen

Jetzt kommt´s. Wenn ich denselben Befehl in der Kommandozeile
ausführe, wird in dem TIFF das Bild korrekt dargestellt!?

Hat jemand eine Idee, worin der Unterschied zwischen der Java
Runtime und der Kommandozeile liegen könnte, die dieses
seltsame Phänomen verursacht?

Danke,
Jochen

Guten Morgen,

hast du beides aus dem gleichen Arbeitsverzeichnis heraus versucht?

Guten Morgen,

hast du beides aus dem gleichen Arbeitsverzeichnis heraus
versucht?

Von Java aus wird die ‚Environment‘-Variable gefüllt, die das entsprechende Verzeichnis als ‚Working‘-Verzeichnis gespeichert hat.

Von der Kommandozeile aus funktioniert das. Egal von welchen Verzeichnis aus ich das starte.

Was mir noch aufgefallen ist …
In der Kommandozeile kommt vom GS folgende Ausgabe. Die ist im Java im StdInBuffer auch vorhanden.

Vielleich hat es was damit zu tun, aber eigentlich mach doch Java auch nichts anderes, als den Befehl über die JRE auszuführen.

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased {277 0 res
olveR}] ****

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased -dict-] **
**

**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> iText 2.1.2 (by lowagie.com)