Arnd Iffland
2005-11-17 07:16:51 UTC
Hi,
i need to get the "real" bounding box of an postscript file.
Background information:
I have developed a system where text in a postscript file could be
replaced. I want to display a warning if the text is to long to fit.
If the the is black on white background, this could be easily done with
ghostscript (gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox) and the bbox
device. But what do i have to do when the text is white on black
background? Because white is used for transparency, the bbox device
always returns the black box where the text is written on as the
bounding box, which is to small.
In http://www.cs.wisc.edu/~ghost/doc/cvs/Devices.htm is descriped, that
option "WhiteIsOpaque" has to be set. But if i put the statement "<<
/WhiteIsOpaque true >> setpagedevice " into my postscript file, the
bbox device returns a box that is far to large.
Is there a way to fix this?
Regards,
Arnd
--
i need to get the "real" bounding box of an postscript file.
Background information:
I have developed a system where text in a postscript file could be
replaced. I want to display a warning if the text is to long to fit.
If the the is black on white background, this could be easily done with
ghostscript (gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox) and the bbox
device. But what do i have to do when the text is white on black
background? Because white is used for transparency, the bbox device
always returns the black box where the text is written on as the
bounding box, which is to small.
In http://www.cs.wisc.edu/~ghost/doc/cvs/Devices.htm is descriped, that
option "WhiteIsOpaque" has to be set. But if i put the statement "<<
/WhiteIsOpaque true >> setpagedevice " into my postscript file, the
bbox device returns a box that is far to large.
Is there a way to fix this?
Regards,
Arnd
--