Re: Help in using gsapi_set_stdio() to capture stdout into a memory buffer

Ken Sharp <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.devel
Message-ID <[email protected]>
At 21:10 24/03/2016 +0000, Joaquim Luis wrote:


>I hadn't send a full working example because to reproduce it would be
>necessary to install the GMT (http://gmt.soest.hawaii.edu) trunk version,
>plus a MEX wrapper to call it from Matlab or alternatively install Julia
>plus a package to call GMT from it. A complicated procedure.

That does indeed sound too complex.


>So I tried to create a simple stand-alone case to provide but, surprise.
>It works too. So, the only case it doesn't work is when the code is called
>from within Matlab. Since it relies on creating a pipe to stdin and stdout
>I am guessing that Matlab is getting in the way and that is what is
>causing the ioerror.

Possibly, without a transcript from PostScript stdout its not really 
possible to tell. However an inability to write to stdout would cause an 
ioerror.

You could of course use a setup where you don't require to use stdin or 
stdout and see what happens. If it works then you know its something to do 
with the environment.


>I still can send you the code if you want, but it won't serve for nothing
>as it works well.

No point then. If it requires an unusual setup to reproduce the problem 
then I don't think we can help you, in general we require our free users to 
reproduce problems on the standard Ghostscript executable. Obviously we 
vary that to a point when dealing with developers but there is a limit to 
how much effort we can expend.


>Regarding the License issue, yes we are aware that Ghostscript is AGPL
>(actually we thought it was still GPL but it makes no big difference).

As long as you're aware that's OK, its something we like to point out early 
before people invest lots of time in case it turns out they can't conform 
to the licence terms.



                     Ken
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.