~ubuntu-branches/ubuntu/vivid/ghostscript/vivid-security

« back to all changes in this revision

Viewing changes to devices/gdevdljm.c

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2014-03-13 12:25:33 UTC
  • Revision ID: package-import@ubuntu.com-20140313122533-ov5fix7qzsq4fyr3
Tags: 9.10~dfsg-0ubuntu8
* debian/patches/1001_pxlcolor-support-jpeg-in-output.patch: Added JPEG
  output support to the "pxlcolor" PCL-XL output device to vastly reduce
  the size of the output when the input document contains images (Upstream
  bug #691880).
* debian/patches/020140313-5d6b18a-set-correct-portrait-landscape-orientation-on-pcl-5ce.patch:
  Set correct portrait/landscape orientation on PCL 5c/e output (Upstream
  bug #693715).
* debian/patches/020140313-6498483-ps2write-fix-a-dsc-comment.patch,
  debian/patches/020140313-095ae57-ps2write-fix-missing-beginresource-comment-for-fontfile-objects.patch:
  Fixes on DSC comments in PostScript output of the "ps2write" device
  Upstream bug #695082).

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
    int penalty_from2to3 = strlen(from2to3);
83
83
    int penalty_from3to2 = strlen(from3to2);
84
84
    int paper_size = gdev_pcl_paper_size((gx_device *) pdev);
 
85
    int page_orientation = gdev_pcl_page_orientation((gx_device *) pdev);
85
86
    int code = 0;
86
87
    bool dup = pdev->Duplex;
87
88
    bool dupset = pdev->Duplex_set >= 0;
109
110
        fputs("\033E", prn_stream);     /* reset printer */
110
111
        /* If the printer supports it, set the paper size */
111
112
        /* based on the actual requested size. */
 
113
        fprintf(prn_stream, "\033&l%dO", page_orientation);
112
114
        if (features & PCL_CAN_SET_PAPER_SIZE) {
113
115
            fprintf(prn_stream, "\033&l%dA", paper_size);
114
116
        }
140
142
    if ((features & PCL_HAS_DUPLEX) && dupset && dup) {
141
143
       /* We are printing duplex, so change margins as needed */
142
144
       if (( (pdev->PageCount/num_copies)%2)==0) {
 
145
          fprintf(prn_stream, "\033&l%dO", page_orientation);
143
146
          if (features & PCL_CAN_SET_PAPER_SIZE) {
144
147
              fprintf(prn_stream, "\033&l%dA", paper_size);
145
148
          }
146
 
          fputs("\033&l0o0l0E", prn_stream);
 
149
          fputs("\033&l0l0E", prn_stream);
147
150
          fputs(odd_page_init, prn_stream);
148
151
       } else
149
152
          fputs(even_page_init, prn_stream);
150
153
    } else {
 
154
        fprintf(prn_stream, "\033&l%dO", page_orientation);
151
155
        if (features & PCL_CAN_SET_PAPER_SIZE){
152
156
            fprintf(prn_stream, "\033&l%dA", paper_size);
153
157
        }
154
 
        fputs("\033&l0o0l0E", prn_stream);
 
158
        fputs("\033&l0l0E", prn_stream);
155
159
        fputs(odd_page_init, prn_stream);
156
160
    }
157
161