negative origins, calculation of bounding box

May 13, 2016 at 3:27 PM
Edited May 18, 2016 at 12:12 PM
Josip, once again, thx for that project.

I've an issue rendering some postscript code generated by Terry Burtons BWIPP implementation ( of a ps barcode library.

Since ghostscript doesn't calculate negative values and crops them (see and my generated ps code originates at negative values I've to translate the ps coordinates to get the device and bounding-box coordinates..

is there an implementation in (I currently use the rasterizer) to get the bounding boxes (ghostscript -sDEVICE=bbox)?

Update: maybe I'd run ghostscript processor 2 times, first time retrieving the bounding boxes (after translating the PS Code into positive coordinates), then running again with the calculated new boundaries. But how can I retrieve the Stdout of showing me the -sDevice=bbox Output, e.g.
%%HiResBoundingBox: 991.961970 995.885970 1105.743974 1071.719124



May 18, 2016 at 1:58 PM
Another Update after some searching:

the ghostscript device -bbox writes its output to stderr instead of stdout. Is there a way to parse the stderr instead of stdout?