print.m

Ben Abbott bpabbott at mac.com
Sun Apr 26 20:49:58 CDT 2009


On Apr 26, 2009, at 6:34 PM, Ben Abbott wrote:

> On Apr 26, 2009, at 5:43 PM, Michael D. Godfrey wrote:
>
>> Ben,
>>
>> So far the new print.m has worked for me.
>> The positioning of xlabel and title text is like before:
>> the screen display is still not good, but the .eps
>> comes out OK.  Now that .eps seems right, I am
>> converting to use of \epsffile{}  in my TeX files.  This
>> is simpler and better than the old \special{}  method,
>> but it uses the BB.
>>
>> By the way, the URL below shows a bit about how
>> Matlab users deal with the BoundingBox issues.
>>
>> http://www.mathworks.com/matlabcentral/fileexchange/18681
>>
>> Michael
>
> Do you imply that typing "print" does result in printed output for
> your postscript printer?
>
> I had not considered writing a script to modify the bounding box.
>
> As we are now using ghostscript in the print.m function, perhaps it
> makes sense to use ghostscript to recalculate the proper bounding-box,
> and the replace the bounding-box produced by gnuplot with one the
> tight version calculated by ghostscript.
>
> I'll work on a change-set for that.
>
> Ben

Michael (or other Windows users),

If you have an existing eps-file named 'test.eps', does the following  
place bounding-box information in the file bbox.txt?

	[s, o] = system ("gswin32c -q -dBATCH  -dNOPAUSE  -sDEVICE=bbox  
test.eps")

If not, does this work?

	[s, o] = system ("gswin32c -q -dBATCH  -dNOPAUSE  -sDEVICE=bbox  
test.eps 2>&1")

	[s, o] = system ("gs -q -dBATCH  -dNOPAUSE  -sDEVICE=bbox test.eps  
2>&1")

For unix systems, the expected result is (for my test.eps)

	octave:1> [s, o] = system ("gs -q -dBATCH  -dNOPAUSE  -sDEVICE=bbox  
test.eps 2>&1")
	s = 0
	o = %%BoundingBox: 91 75 572 461
	%%HiResBoundingBox: 91.313997 75.167998 571.592936 460.979986

If I understand what is happening for Unix systems, ghostscript is  
printing the bbox info to stderr.

Ben








More information about the Bug-octave mailing list