print.m
Ben Abbott
bpabbott at mac.com
Tue Apr 28 19:13:42 CDT 2009
On Apr 28, 2009, at 4:08 AM, Ben Abbott wrote:
> 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
As I discovered a rather critical typo/;bug, I've pushed another
changeset for print.m.
Attached is a test script that will produce various output files. This
should run without errors on both Windows and Unix systems.
Be sure to pull from savannah before running the script.
Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_print.m
Type: application/octet-stream
Size: 1195 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20090428/a1201aa6/attachment.obj
-------------- next part --------------
More information about the Bug-octave
mailing list