[gs-devel] Problems with stdin and return code -110
Russell Lang
gsview at ghostgum.com.au
Thu Feb 5 13:04:21 PST 2009
Sheri,
On 5 Feb 2009 at 15:58, Sheri Steeves wrote:
> I did get around my wide name problem by copying the file to a temporary
> location, and handling PDF, PS and EPS this way - giving me only a
> single path of code to maintain, as I was under the impression that you
> could only stream EPS and PS.
>
> >From the online docs:
> http://pages.cs.wisc.edu/~ghost/doc/svn/Use.htm#Pipes
> Ghostscript cannot read PDF files from standard input or a pipe because
> the PDF language inherently requires random access to the file. Thus '-'
> only works with PostScript documents.
>
> This may be where my confusion started.
>
> If you are saying that I can stream the PDF in through the stdin, and
> that ghostscript makes it's own temp copy for random access,
Yes.
gswin32c - < examples\annots.pdf
As with any code using the API, I recommend that you first try everything from
the command line.
> I may go
> back to the stdin approach to avoid the extra temp file copy.
Either you create the temp copy, or ghostscript creates the temp copy. Your
code to do the temporary copy of a PDF files is probably slightly faster than the
code in ghostscript, and may do a better job of deleting the temporary file
afterwards.
Russell Lang gsview at ghostgum.com.au
Ghostgum Software Pty Ltd http://www.ghostgum.com.au/
More information about the gs-devel
mailing list