print.m

Ben Abbott bpabbott at mac.com
Tue Apr 28 03:08:40 CDT 2009


On Apr 28, 2009, at 4:02 AM, Ivan Sutoris wrote:

> On Tue, Apr 28, 2009 at 9:59 AM, Ivan Sutoris  
> <ivan.sutoris at gmail.com> wrote:
>> On Tue, Apr 28, 2009 at 9:49 AM, Ben Abbott <bpabbott at mac.com> wrote:
>>> Thanks Ivan.
>>>
>>> I was hoping that the command below would redirect stderr to  
>>> stdout and
>>> return the result in "out"
>>>
>>>      [s, out] = system ("gswin32c -q -dBATCH  -dNOPAUSE  - 
>>> sDEVICE=bbox
>>> test.eps 2>&1")
>>>
>>> The link below indicates that this should work
>>>
>>>        http://support.microsoft.com/kb/110930
>>>
>>> On WIndows, does this command return the bounding-box information  
>>> in "out"?
>>>
>>> Ben
>>
>> Nope, output still goes to the screen, but this works (if I specify
>> output filename):
>>
>> gswin32c -q -dBATCH  -dNOPAUSE  -sDEVICE=bbox test.eps > bbox.txt  
>> 2>&1
>>
>>  Are you sure that you don't need to specify filename explicitly?  
>> I've
>> read the page you linked and I don't see any mention of default "out"
>> file.
>>
>> Hope this helps
>> Ivan Sutoris
>>
>
> Ah, sorry I didn't understand correctly, you want output in Octave
> variable out. That seems to work:
>
> [s, out] = system ("gswin32c -q -dBATCH  -dNOPAUSE  -sDEVICE=bbox
> test.eps 2>&1")
>
> s = 0
> out = %%BoundingBox: 58 54 406 294
> %%HiResBoundingBox: 58.679998 54.503998 405.412863 293.674983
>
> Ivan Sutoris

Thanks Ivan, that is exactly what I wanted!

Ben




More information about the Bug-octave mailing list