Tuesday, November 15, 2011

Aviodding the blank margin of a eps picture being auto croped by some softwares

Some one complained to me that when he inserted a gnuplot produced eps picture into some software (not all) the blank margins are auto cropped. And he want to avoid this to happen.
Yes, I also found this problem myself. Some software "intelligently" crop the blank margin of a postscript picture. Always this is just OK. But in some special cases, we set a blank margin of special purpose, for example, to leave some spaces for readers to add some notes. In these cases, the "intelligence" becomes "stupid".
I solve this problem by adding a invisible rectangle (with linewidth equals 0 or with color same as the background color and fillstyle onborder) as large as the screen, i.e.,
set object rectangle from screen 0,0 to screen 1,1 \
    lw 0 fillstyle noborder behind   
Then although there are blank margins but they are not blank in fact. So when the picture is inserted to other software, the margin will not be auto cropped.

No comments:

Post a Comment

Creative Commons License
Except as otherwise noted, the content of this page is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.