[GRASS-dev] d.out.file now talks to the PostScript driver
glynn at gclements.plus.com
Mon May 14 19:03:12 EDT 2007
> I added PostScript support to d.out.file, and also did a bit of cleanup
> in the script along the way. It seems to work very nicely.
> For an example see the d.out.file help page.
> Also new in d.out.file is a size=width,height option for setting
> GRASS_WIDTH and GRASS_HEIGHT.
> One thing that I wanted to add was EPS support. To do that I'd just
> apply a little patch to the start of the output file:
> +%!PS-Adobe-2.0 EPSF-2.0
> +%%Creator: $USER
> +%%CreationDate: `date`
> +%%Title: $outname
> +%%BoundingBox: 0 0 $GRASS_WIDTH $GRASS_HEIGHT
> According to this page, EPS doesn't like the "erasepage" and "initclip"
> operators, which the PS driver uses.
FWIW, I've added some enhancements to the PS driver:
1. DSC comments are added.
2. If the output file ends in ".eps", the problematic operators will
not be used, and "EPSF-3.0" will be added to the %!PS- line.
One problem with the DSC comments is that the driver cannot determine
the language level at the point that the header is written, so it
always reports level 3.
Printers don't read DSC comments, so this shouldn't have any effect
upon printers which don't support level 3.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev