diff options
author | Till Kamppeter <till.kamppeter@gmail.com> | 2012-02-03 16:20:25 +0100 |
---|---|---|
committer | Till Kamppeter <till.kamppeter@gmail.com> | 2012-02-03 16:20:25 +0100 |
commit | e837609b2955680dc59ca4f357076be7cd819a46 (patch) | |
tree | e3a540f7756f6b2a29a05d11e34a8474b0595cc3 | |
parent | c3464da3ee42b8af645af6eadabea4977d948b1a (diff) | |
download | ghostpdl-e837609b2955680dc59ca4f357076be7cd819a46.tar.gz |
CUPS Raster: Fixed rotating of input pages with unknown sizes
-rw-r--r-- | gs/cups/gdevcups.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gs/cups/gdevcups.c b/gs/cups/gdevcups.c index e5a1242fa..cd6f877e1 100644 --- a/gs/cups/gdevcups.c +++ b/gs/cups/gdevcups.c @@ -3463,20 +3463,6 @@ cups_put_params(gx_device *pdev, /* I - Device info */ (cups->MediaSize[1] > cups->PPD->custom_max[1])) && ((cups->MediaSize[0] <= cups->PPD->custom_max[1]) && (cups->MediaSize[1] <= cups->PPD->custom_max[0]))) { - /* Do not rotate */ - cups->landscape = 0; - - for (i = 0; i < 4; i ++) - margins[i] = cups->PPD->custom_margins[i] / 72.0; - if (xflip == 1) - { - swap = margins[0]; margins[0] = margins[2]; margins[2] = swap; - } - if (yflip == 1) - { - swap = margins[1]; margins[1] = margins[3]; margins[3] = swap; - } - } else { /* Rotate */ gx_device_set_media_size(pdev, cups->MediaSize[1], cups->MediaSize[0]); @@ -3495,6 +3481,20 @@ cups_put_params(gx_device *pdev, /* I - Device info */ { swap = margins[0]; margins[0] = margins[2]; margins[2] = swap; } + } else { + /* Do not rotate */ + cups->landscape = 0; + + for (i = 0; i < 4; i ++) + margins[i] = cups->PPD->custom_margins[i] / 72.0; + if (xflip == 1) + { + swap = margins[0]; margins[0] = margins[2]; margins[2] = swap; + } + if (yflip == 1) + { + swap = margins[1]; margins[1] = margins[3]; margins[3] = swap; + } } } } |