diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2009-01-19 11:13:05 +0000 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2009-01-19 11:13:05 +0000 |
commit | f58145da385fbc02f0baa63f3f07d2f69de9836c (patch) | |
tree | 2ead907e0a51447192d0883adcf7f943b66f1b3f | |
parent | bddc0c3f0c339009c239cacf4b67805c0c6c64c2 (diff) |
Revision 8951 missed an important part of the fix for pswrite, emitting a %%PageBoundingBox for each
page of the output.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@9374 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r-- | gs/base/gdevpsu.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gs/base/gdevpsu.c b/gs/base/gdevpsu.c index 10332c642..8eec84ac4 100644 --- a/gs/base/gdevpsu.c +++ b/gs/base/gdevpsu.c @@ -281,8 +281,13 @@ psw_write_page_header(stream *s, const gx_device *dev, bool do_scale, long page_ord, int dictsize) { long page = dev->PageCount + 1; + int width = (int)(dev->width * 72.0 / dev->HWResolution[0] + 0.5); + int height = (int)(dev->height * 72.0 / dev->HWResolution[1] + 0.5); pprintld2(s, "%%%%Page: %ld %ld\n%%%%BeginPageSetup\n", page, page_ord); + if (!pdpc->ProduceEPS) + pprintld2(s, "%%%%PageBoundingBox: 0 0 %ld %ld\n", width, height); + /* * Adobe's documentation says that page setup must be placed outside the * save/restore that encapsulates the page contents, and that the @@ -295,8 +300,6 @@ psw_write_page_header(stream *s, const gx_device *dev, psw_put_procset_name(s, dev, pdpc); stream_puts(s, " begin\n"); if (!pdpc->ProduceEPS) { - int width = (int)(dev->width * 72.0 / dev->HWResolution[0] + 0.5); - int height = (int)(dev->height * 72.0 / dev->HWResolution[1] + 0.5); typedef struct ps_ { const char *size_name; int width, height; |