summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeong Kim <jeong.kim@artifex.com>2002-05-08 05:55:26 +0000
committerJeong Kim <jeong.kim@artifex.com>2002-05-08 05:55:26 +0000
commitc1b84fecf4d2333994a18f49d7d51ce68195ad53 (patch)
tree47cb176c9f936bf2f260db67fdc6eb6478c7916d
parent9ccb882a7dd1e3b418e15aae3248fca0d68b155b (diff)
Fix: Top and bottom margins for BJ10e were incorrect.
Now works corretly as BJ10 manual describes. Fix by Jim Hague (bears). Fixes SF#477644. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@2624 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r--gs/src/gdevbj10.c46
1 files changed, 43 insertions, 3 deletions
diff --git a/gs/src/gdevbj10.c b/gs/src/gdevbj10.c
index 2e564c48a..64b7436e4 100644
--- a/gs/src/gdevbj10.c
+++ b/gs/src/gdevbj10.c
@@ -122,12 +122,32 @@ const gx_device_printer far_data gs_bj200_device =
/*
* (<simon@pogner.demon.co.uk>, aka <sjwright@cix.compulink.co.uk>):
- * My bj10ex, which as far as I can tell is just like a bj10e, works
- * fine with the bj200 setup here.
+ * My bj10ex, which as far as I can tell is just like a bj10e, needs a
+ * bottom margin of 0.4" (actually, you must not print within 0.5" of
+ * the bottom; somewhere, an extra 0.1" is creeping in).
+ *
+ * (<jim.hague@acm.org>):
+ * I have a BJ10sx and the BJ10sx manual. This states that the top and
+ * bottom margins for the BJ10sx are 0.33" and 0.5". The latter may
+ * explain Simon's finding. The manual also instructs Win31 users to
+ * select 'BJ10e' as their driver, so presumably the margins will be
+ * identical and thus also correct for BJ10e. The values for the side
+ * margins given are identical to those above.
+ *
+ * As of 2nd Nov 2001 the BJ10 sx manual is at
+ * http://www.precision.com/Printer%20Manuals/Canon%20BJ-10sx%20Manual.pdf.
*/
+#define BJ10E_TOP_MARGIN 0.33
+#define BJ10E_BOTTOM_MARGIN (0.50 + 0.04)
+
+private dev_proc_open_device(bj10e_open);
+
+private gx_device_procs prn_bj10e_procs =
+ prn_procs(bj10e_open, gdev_prn_output_page, gdev_prn_close);
+
const gx_device_printer far_data gs_bj10e_device =
- prn_device(prn_bj200_procs, "bj10e",
+ prn_device(prn_bj10e_procs, "bj10e",
DEFAULT_WIDTH_10THS,
DEFAULT_HEIGHT_10THS,
360, /* x_dpi */
@@ -208,6 +228,26 @@ bj200_open(gx_device *pdev)
return gdev_prn_open(pdev);
}
+private int
+bj10e_open(gx_device *pdev)
+{
+ /* See bj200_open() */
+ static const float a4_margins[4] =
+ { BJ200_A4_SIDE_MARGIN, BJ10E_BOTTOM_MARGIN,
+ BJ200_A4_SIDE_MARGIN, BJ10E_TOP_MARGIN
+ };
+ static const float letter_margins[4] =
+ { BJ200_LETTER_SIDE_MARGIN, BJ10E_BOTTOM_MARGIN,
+ BJ200_LETTER_SIDE_MARGIN, BJ10E_TOP_MARGIN
+ };
+
+ gx_device_set_margins(pdev,
+ (pdev->width / pdev->x_pixels_per_inch <= 8.4 ?
+ a4_margins : letter_margins),
+ true);
+ return gdev_prn_open(pdev);
+}
+
/* Send the page to the printer. */
private int
bj10e_print_page(gx_device_printer *pdev, FILE *prn_stream)