static dev_proc_print_page_copies(fs600_print_page_copies); static dev_proc_print_page_copies(ljet_print_page_copies); static dev_proc_print_page_copies(ljetplus_print_page_copies); static dev_proc_print_page_copies(ljet2p_print_page_copies); static dev_proc_print_page_copies(ljet3_print_page_copies); static dev_proc_print_page_copies(ljet3d_print_page_copies); static dev_proc_print_page_copies(ljet4_print_page_copies); static dev_proc_print_page_copies(ljet4d_print_page_copies); static dev_proc_print_page_copies(lp2563_print_page_copies); static dev_proc_print_page_copies(oce9050_print_page_copies); static dev_proc_print_page_copies(ljet4pjl_print_page_copies); static dev_proc_get_params(hpjet_get_params); static dev_proc_put_params(hpjet_put_params); static const gx_device_procs prn_hp_procs = prn_params_procs(hpjet_open, gdev_prn_output_page, hpjet_close, hpjet_get_params, hpjet_put_params); static gx_device_procs prn_ljet4pjl_procs = prn_params_procs(hpjet_open, gdev_prn_output_page, ljet4pjl_close, gdev_prn_get_params, gdev_prn_put_params); typedef struct gx_device_hpjet_s gx_device_hpjet; struct gx_device_hpjet_s { gx_device_common; gx_prn_device_common; int MediaPosition; bool MediaPosition_set; bool ManualFeed; bool ManualFeed_set; bool Tumble;
#define T_MARGIN_POSTCARD 0.20 /* margins of env4 size paper */ #define L_MARGIN_ENV4 0.20 #define B_MARGIN_ENV4 0.20 #define R_MARGIN_ENV4 0.20 #define T_MARGIN_ENV4 0.20 /* The device descriptors */ static dev_proc_open_device(npdl_open); static dev_proc_open_device(npdl_close); static dev_proc_print_page_copies(npdl_print_page_copies); static dev_proc_put_params(npdl_put_params); static dev_proc_image_out(npdl_image_out); static gx_device_procs npdl_prn_procs = prn_params_procs(npdl_open, gdev_prn_output_page, npdl_close, lprn_get_params, npdl_put_params); gx_device_lprn far_data gs_npdl_device = lprn_duplex_device(gx_device_lprn, npdl_prn_procs, "npdl", X_DPI, Y_DPI, /* default resolution */ 0.0, 0.0, 0.0, 0.0, /* margins */ 1, npdl_print_page_copies, npdl_image_out); /* ------ internal routines ------ */ /* paper size code */ /* modified from gdevpcl.h and gdevmjc.c */ #define PAPER_SIZE_LETTER 2 #define PAPER_SIZE_A5 25 #define PAPER_SIZE_A4 26 #define PAPER_SIZE_A3 27
gx_device_common; gx_prn_device_common; gx_fax_device_common; long MaxStripSize; /* 0 = no limit, other is UNCOMPRESSED limit */ /* The type and range of FillOrder follows TIFF 6 spec */ int FillOrder; /* 1 = lowest column in the high-order bit, 2 = reverse */ bool BigEndian; /* true = big endian; false = little endian*/ uint16 Compression; /* same values as TIFFTAG_COMPRESSION */ TIFF *tif; /* For TIFF output only */ }; typedef struct gx_device_tfax_s gx_device_tfax; /* Define procedures that adjust the paper size. */ static const gx_device_procs gdev_tfax_std_procs = prn_params_procs(tfax_open, tiff_output_page, tfax_close, tfax_get_params, tfax_put_params); #define TFAX_DEVICE(dname, print_page, compr)\ {\ FAX_DEVICE_BODY(gx_device_tfax, gdev_tfax_std_procs, dname, print_page),\ TIFF_DEFAULT_STRIP_SIZE /* strip size byte count */,\ 1 /* lowest column in the high-order bit */,\ arch_is_big_endian /* default to native endian (i.e. use big endian iff the platform is so*/,\ compr,\ NULL\ } const gx_device_tfax gs_tiffcrle_device = TFAX_DEVICE("tiffcrle", tiffcrle_print_page, COMPRESSION_CCITTRLE); const gx_device_tfax gs_tiffg3_device =
*/ #define OKI4W_MARGINS_LETTER 0.125, 0.25, 0.125, 0.07 #define OKI4W_MARGINS_A4 0.125, 0.25, 0.125, 0.07 /* We round up the LINE_SIZE to a multiple of a ulong for faster scanning. */ #define word ulong #define W sizeof(word) #define byte unsigned char /* The device descriptors */ static dev_proc_open_device(oki4w_open); static dev_proc_close_device(oki4w_close); static dev_proc_print_page(oki4w_print_page); static gx_device_procs prn_hp_procs = prn_params_procs(oki4w_open, gdev_prn_output_page, oki4w_close, gdev_prn_get_params, gdev_prn_put_params); gx_device_printer far_data gs_oki4w_device = prn_device(prn_hp_procs, "oki4w", DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS, X_DPI, Y_DPI, 0, 0, 0, 0, /* margins filled in by oki4w_open */ 1, oki4w_print_page); #define ppdev ((gx_device_printer *)pdev) /* Find out paper size code */ static int oki_paper_size(gx_device *dev) { float height_inches = dev->height / dev->y_pixels_per_inch;
* Stephen Taylor [email protected] [email protected] */ #include "gdevprn.h" #include "gsparams.h" /* The procedure descriptors */ /* declare functions */ static dev_proc_print_page(lxm5700m_print_page); static dev_proc_get_params(lxm_get_params); static dev_proc_put_params(lxm_put_params); /* set up dispatch table. I follow gdevdjet in using gdev_prn_output_page */ /* Since the print_page doesn't alter the device, this device can print in the background */ static const gx_device_procs lxm5700m_procs = prn_params_procs(gdev_prn_open, gdev_prn_bg_output_page, gdev_prn_close, lxm_get_params, lxm_put_params); /* The device descriptors */ /* define a subclass with useful state in it. */ typedef struct lxm_device_s { /* a sub-class of gx_device_printer */ gx_device_common; gx_prn_device_common; int headSeparation; } lxm_device; /* Standard lxm5700m device */ lxm_device far_data gs_lxm5700m_device = { prn_device_std_body(lxm_device, lxm5700m_procs, "lxm5700m", DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS, 600, 600, /* x dpi, y dpi */
gx_fax_device_common; long MaxStripSize; /* 0 = no limit, other is UNCOMPRESSED limit */ /* The type and range of FillOrder follows TIFF 6 spec */ int FillOrder; /* 1 = lowest column in the high-order bit, 2 = reverse */ bool BigEndian; /* true = big endian; false = little endian*/ bool UseBigTIFF; uint16 Compression; /* same values as TIFFTAG_COMPRESSION */ TIFF *tif; /* For TIFF output only */ }; typedef struct gx_device_tfax_s gx_device_tfax; /* Define procedures that adjust the paper size. */ static const gx_device_procs gdev_tfax_std_procs = /* FIXME: From initial analysis this is NOT safe for bg_printing, but might be fixable */ prn_params_procs(tfax_open, gdev_prn_output_page_seekable, tfax_close, tfax_get_params, tfax_put_params); #define TFAX_DEVICE(dname, print_page, compr)\ {\ FAX_DEVICE_BODY(gx_device_tfax, gdev_tfax_std_procs, dname, print_page),\ TIFF_DEFAULT_STRIP_SIZE /* strip size byte count */,\ 1 /* lowest column in the high-order bit */,\ arch_is_big_endian /* default to native endian (i.e. use big endian iff the platform is so*/,\ false, /* default to not using bigtiff */\ compr,\ NULL\ } const gx_device_tfax gs_tiffcrle_device = TFAX_DEVICE("tiffcrle", tiffcrle_print_page, COMPRESSION_CCITTRLE);
#include "gdevprn.h" #include "strimpl.h" #include "scfx.h" #include "gdevfax.h" /* The device descriptor */ static dev_proc_print_page(cfax_print_page); static dev_proc_close_device(cfax_prn_close); /* Define procedures for cfax. For sff multipage documents */ /* a special close procedure is required because sff needs */ /* an additional "end of document" signature after the last */ /* "end page" signature */ /* Since the print_page doesn't alter the device, this device can print in the background */ static const gx_device_procs gdev_cfax_std_procs = prn_params_procs(gdev_prn_open, gdev_prn_bg_output_page, cfax_prn_close, gdev_fax_get_params, gdev_fax_put_params); const gx_device_fax gs_cfax_device = { FAX_DEVICE_BODY(gx_device_fax, gdev_cfax_std_procs, "cfax", cfax_print_page) }; /* ---------------- SFF output ----------------- */ static void cfax_byte(uint c, FILE * file) { fputc(c & 0xff, file); } static void cfax_word(ushort c, FILE * file)