diff options
author | Robin Watts <robin.watts@artifex.com> | 2018-10-18 16:23:38 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2018-10-18 16:27:57 +0100 |
commit | d80be068ec5c50a27199b949cbec03fc27adcc90 (patch) | |
tree | 17870d6af188e99b29d2deedc8d45196939bd50d /source/fitz | |
parent | 22fa8866a4fa753ebe9aefa08f2cdc101b399119 (diff) | |
download | mupdf-d80be068ec5c50a27199b949cbec03fc27adcc90.tar.xz |
Bug 699967: Follow ons.
1) Reset the margins at the start of each PCL job to avoid offsetting
the page contents.
2) Fix height/band_height confusion in mono band writing.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/output-pcl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/fitz/output-pcl.c b/source/fitz/output-pcl.c index cb405d6b..316c27b6 100644 --- a/source/fitz/output-pcl.c +++ b/source/fitz/output-pcl.c @@ -394,6 +394,8 @@ pcl_header(fz_context *ctx, fz_output *out, fz_pcl_options *pcl, int num_copies, if (pcl->features & HACK__IS_A_LJET4PJL) fz_write_string(ctx, out, "\033%-12345X@PJL\r\n@PJL ENTER LANGUAGE = PCL\r\n"); fz_write_string(ctx, out, "\033E"); /* reset printer */ + /* Reset the margins */ + fz_write_string(ctx, out, "\033&10e-180u36Z"); /* If the printer supports it, set orientation */ if (pcl->features & PCL_HAS_ORIENTATION) { @@ -1211,7 +1213,7 @@ mono_pcl_write_band(fz_context *ctx, fz_band_writer *writer_, int ss, int band_s pcl = &writer->options; /* Transfer raster graphics. */ - for (y = 0; y < h; y++, data += ss) + for (y = 0; y < band_height; y++, data += ss) { const unsigned char *end_data = data + line_size; |