Comment 15 for bug 227449

Revision history for this message
Alvin Penner (apenner) wrote :

attached is a response from Wolfgang Glunz in response to a question about the first line.
It appears that the first line goes to stderr and not stdout, so all that is needed is to make sure that these two devices are not the same.

.....................................................................

X-RCPT-To: <email address hidden>
From: "Wolfgang Glunz" <email address hidden>
To: "'Alvin Penner'" <email address hidden>
Subject: RE: pstoedit first line of output
Date: Thu, 22 May 2008 20:39:37 +0200
Organization: none
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6838
Importance: Normal
Thread-Index: Aci5KJphxPeS4kirRRSlOvhzKYf21QDAFmsg
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Provags-ID: V01U2FsdGVkX1/wJLotflkY0RxtjW3blfRUJfm09Gt6oGlIwoo
 3KIA6QTrdtDJ4rB5WVvVjCJelewh6RPQWIXdodfngtaxDe1meU
 yVslyUsa4DSq6YcGcDKXQ==
X-UID: 10736

Hi Alvin,

Short answer - "no this is currently not possible".
Long answer. I wonder why this hasn't come up before. Inkscape is using
pstoedit for years already. Further, I wonder whether this is really a
problem since the line is being written to stderr and not stdout.
However, one know problem is slightly related to this. Some PostScript files
write some diagnostic messages to stdout. These messages then also appear in
the output stream which then usually causes the output to be scrambled.
Luckily, such cases are rare.
One option would be to write the normal output always to a temporary file
and redirect the "rest" to nowhere and then flush the content of the temp
file to stdout. However, this somehow violoates the Unix pipe paradigm,
since the first line of the result output would come only after the whole
file has been processed. With the current implementation, the output is
written to stdout as it is produced hence allowing some sort of pipelined
processing.
Coming back to the first line issue. Of course, I can add an option to
suppress this first line but as explained, it solves either a non-problem or
only half of the problem.

Best Regards

Wolfgang

> -----Original Message-----
> From: Alvin Penner [mailto:<email address hidden>]
> Sent: Sunday, May 18, 2008 10:47 PM
> To: <email address hidden>
> Subject: pstoedit first line of output
>
>
> Hello Dr. Glunz,
> First of all, thank you very much for your product
> pstoedit. I have been using it to convert to .svg and it is
> extremely useful. I am running on Windows so I have no other
> support for postscript other than pstoedit.
> I have a question about running it from a script file :
> is it possible to suppress the output of the first line which
> normally says:
> pstoedit: version 3.45 / DLL interface 108 (build Sep 10 2007
> - release build - MS VC++ 1300) : Copyright (C) 1993 - 2007
> Wolfgang Glunz
> What I am trying to do is use pstoedit to import files
> into Inkscape (http://www.inkscape.org/). Inkscape has a
> system of extensions, one of which tries to do a file import
> from pstoedit using the command :
> <command reldir="path">pstoedit -f plot-svg</command>
> Both input and output are the default stdin and stdout,
> but the stdout appears to contain this header line which is
> not .svg. In any event, Inkscape crashes at this point.
> Is it possible to use an option to suppress this first line?
>