XPR(1) AIX XPR(1) NAME xpr - print an X window dump SYNOPSIS xxxxpppprrrr [ ----ddddeeeevvvviiiicccceeee _d_e_v_t_y_p_e ] [ ----ssssccccaaaalllleeee _s_c_a_l_e ] [ ----hhhheeeeiiiigggghhhhtttt _i_n_c_h_e_s ] [ ----wwwwiiiiddddtttthhhh _i_n_c_h_e_s ] [ ----lllleeeefffftttt _i_n_c_h_e_s ] [ ----ttttoooopppp _i_n_c_h_e_s ] [ ----hhhheeeeaaaaddddeeeerrrr _s_t_r_i_n_g ] [ ----ttttrrrraaaaiiiilllleeeerrrr _s_t_r_i_n_g ] [ ----llllaaaannnnddddssssccccaaaappppeeee ] [ ----ppppoooorrrrttttrrrraaaaiiiitttt ] [ ----ppppllllaaaannnneeee _n_u_m_b_e_r ] [ ----ggggrrrraaaayyyy ] [ ----rrrrvvvv ] [ ----ccccoooommmmppppaaaacccctttt ] [ ----oooouuuuttttppppuuuutttt _f_i_l_e_n_a_m_e ] [ ----aaaappppppppeeeennnndddd _f_i_l_e_n_a_m_e ] [ ----nnnnooooffffffff ] [ ----sssspppplllliiiitttt _n ] [ ----ppppssssffffiiiigggg ] [ ----ddddeeeennnnssssiiiittttyyyy _d_p_i ] [ ----ccccuuuuttttooooffffffff _l_e_v_e_l ] [ ----nnnnooooppppoooossssiiiittttiiiioooonnnn ] [ ----ggggaaaammmmmmmmaaaa _c_o_r_r_e_c_t_i_o_n ] [ ----rrrreeeennnnddddeeeerrrr _a_l_g_o_r_i_t_h_m ] [ ----sssslllliiiiddddeeee ] [ _f_i_l_e_n_a_m_e ] DESCRIPTION _x_p_r takes as input a window dump file produced by _x_w_d(_1) and formats it for output on PostScript printers, the Digital LN03 or LA100, the IBM PP3812 page printer, the HP LaserJet (or other PCL printers), or the HP PaintJet. If no file argument is given, the standard input is used. By default, _x_p_r prints the largest possible representation of the window on the output page. Options allow the user to add headers and trailers, specify margins, adjust the scale and orienta- tion, and append multiple window dumps to a single output file. Output is to standard output unless ----oooouuuuttttppppuuuutttt is speci- fied. CCCCoooommmmmmmmaaaannnndddd OOOOppppttttiiiioooonnnnssss ----ddddeeeevvvviiiicccceeee _d_e_v_t_y_p_e Specifies the device on which the file will be printed. Currently supported: llllaaaa111100000000 Digital LA100 lllljjjjeeeetttt HP LaserJet series and other monochrome PCL devices such as ThinkJet, QuietJet, Rugged- Writer, HP2560 series, and HP2930 series printers llllnnnn00003333 Digital LN03 ppppjjjjeeeetttt HP PaintJet (color mode) ppppjjjjeeeettttxxxxllll HP HP PaintJet XL Color Graphics Printer (color mode) pppppppp IBM PP3812 ppppssss PostScript printer The default is PostScript. ----ddddeeeevvvviiiicccceeee llllwwww (LaserWriter) is equivalent to -device ps and is provided only for back- wards compatibility. ----ssssccccaaaalllleeee _s_c_a_l_e Affects the size of the window on the page. The PostScript, LN03, and HP printers are able to translate Rev. Release 5 Page 1 XPR(1) AIX XPR(1) each bit in a window pixel map into a grid of a speci- fied size. For example each bit might translate into a 3x3 grid. This would be specified by ----ssssccccaaaalllleeee _3. By default a window is printed with the largest scale that will fit onto the page for the specified orientation. ----hhhheeeeiiiigggghhhhtttt _i_n_c_h_e_s Specifies the maximum height of the page. ----wwwwiiiiddddtttthhhh _i_n_c_h_e_s Specifies the maximum width of the page. ----lllleeeefffftttt _i_n_c_h_e_s Specifies the left margin in inches. Fractions are allowed. By default the window is centered in the page. ----ttttoooopppp _i_n_c_h_e_s Specifies the top margin for the picture in inches. Fractions are allowed. ----hhhheeeeaaaaddddeeeerrrr _s_t_r_i_n_g Specifies a header string to be printed above the win- dow. ----ttttrrrraaaaiiiilllleeeerrrr _s_t_r_i_n_g Specifies a trailer string to be printed below the win- dow. ----llllaaaannnnddddssssccccaaaappppeeee Forces the window to printed in landscape mode. By default a window is printed such that its longest side follows the long side of the paper. ----ppppllllaaaannnneeee _n_u_m_b_e_r Specifies which bit plane to use in an image. The default is to use the entire image and map values into black and white based on color intensities. ----ggggrrrraaaayyyy _2 | _3 | _4 Uses a simple 2x2, 3x3, or 4x4 gray scale conversion on a color image, rather than mapping to strictly black and white. This doubles, triples, or quadruples the effective width and height of the image. ----ppppoooorrrrttttrrrraaaaiiiitttt Forces the window to be printed in portrait mode. By default a window is printed such that its longest side follows the long side of the paper. ----rrrrvvvv Forces the window to be printed in reverse video. ----ccccoooommmmppppaaaacccctttt Rev. Release 5 Page 2 XPR(1) AIX XPR(1) Uses simple run-length encoding for compact representa- tion of windows with lots of white pixels. ----oooouuuuttttppppuuuutttt _f_i_l_e_n_a_m_e Specifies an output file name. If this option is not specified, standard output is used. ----aaaappppppppeeeennnndddd _f_i_l_e_n_a_m_e Specifies a filename previously produced by _x_p_r to which the window is to be appended. ----nnnnooooffffffff When specified in conjunction with ----aaaappppppppeeeennnndddd, the window will appear on the same page as the previous window. ----sssspppplllliiiitttt _n This option allows the user to split a window onto several pages. This might be necessary for very large windows that would otherwise cause the printer to over- load and print the page in an obscure manner. ----ppppssssffffiiiigggg Suppress translation of the PostScript picture to the center of the page. ----ddddeeeennnnssssiiiittttyyyy _d_p_i Indicates what dot-per-inch density should be used by the HP printer. ----ccccuuuuttttooooffffffff _l_e_v_e_l Changes the intensity level where colors are mapped to either black or white for monochrome output on a Laser- Jet printer. The _l_e_v_e_l is expressed as percentage of full brightness. Fractions are allowed. ----nnnnooooppppoooossssiiiittttiiiioooonnnn This option causes header, trailer, and image position- ing command generation to be bypassed for LaserJet, PaintJet and PaintJet XL printers. ----ggggaaaammmmmmmmaaaa _c_o_r_r_e_c_t_i_o_n This changes the intensity of the colors printed by PaintJet XL printer. The _c_o_r_r_e_c_t_i_o_n is a floating point value in the range 0.00 to 3.00. Consult the operator's manual to determine the correct value for the specific printer. ----rrrreeeennnnddddeeeerrrr _a_l_g_o_r_i_t_h_m This allows PaintJet XL printer to render the image with the best quality versus performance tradeoff. Consult the operator's manual to determine which _a_l_g_o_- _r_i_t_h_ms are available. Rev. Release 5 Page 3 XPR(1) AIX XPR(1) ----sssslllliiiiddddeeee This option allows overhead transparencies to be printed using the PaintJet and PaintJet XL printers. SEE ALSO xwd(1), xwud(1), X(1) LIMITATIONS The current version of _x_p_r can generally print out on the LN03 most X windows that are not larger than two-thirds of the screen. For example, it will be able to print out a large Emacs window, but it will usually fail when trying to print out the entire screen. The LN03 has memory limita- tions that can cause it to incorrectly print very large or complex windows. The two most common errors encountered are ``band too complex'' and ``page memory exceeded.'' In the first case, a window may have a particular six pixel row that contains too many changes (from black to white to black). This will cause the printer to drop part of the line and possibly parts of the rest of the page. The printer will flash the number `1' on its front panel when this problem occurs. A possible solution to this problem is to increase the scale of the picture, or to split the pic- ture onto two or more pages. The second problem, ``page memory exceeded,'' will occur if the picture contains too much black, or if the picture contains complex half-tones such as the background color of a display. When this prob- lem occurs the printer will automatically split the picture into two or more pages. It may flash the number `5' on its from panel. There is no easy solution to this problem. It will probably be necessary to either cut and paste, or to rework the application to produce a less complex picture. There are several limitations on the LA100 support: the pic- ture will always be printed in portrait mode, there is no scaling, and the aspect ratio will be slightly off. Support for PostScript output currently cannot handle the ----aaaappppppppeeeennnndddd, ----nnnnooooffffffff or ----sssspppplllliiiitttt options. The ----ccccoooommmmppppaaaacccctttt option is _o_n_l_y supported for PostScript output. It compresses white space but not black space, so it is not useful for reverse-video windows. For color images, should map directly to PostScript image support. HP PRINTERS If no ----ddddeeeennnnssssiiiittttyyyy is specified on the command line 300 dots per inch will be assumed for _l_j_e_t and 90 dots per inch for _p_j_e_t. Allowable _d_e_n_s_i_t_y values for a LaserJet printer are 300, Rev. Release 5 Page 4 XPR(1) AIX XPR(1) 150, 100, and 75 dots per inch. Consult the operator's manual to determine densities supported by other printers. If no ----ssssccccaaaalllleeee is specified the image will be expanded to fit the printable page area. The default printable page area is 8x10.5 inches. Other paper sizes can be accommodated using the ----hhhheeeeiiiigggghhhhtttt and ----wwwwiiiiddddtttthhhh options. Note that a 1024x768 image fits the default printable area when processed at 100 dpi with scale=1, the same image can also be printed using 300 dpi with scale=3 but will require considerably more data be transferred to the printer. _x_p_r may be tailored for use with monochrome PCL printers other than the LaserJet. To print on a ThinkJet (HP2225A) _x_p_r could be invoked as: xpr -density 96 -width 6.667 _f_i_l_e_n_a_m_e or for black-and-white output to a PaintJet: xpr -density 180 _f_i_l_e_n_a_m_e The monochrome intensity of a pixel is computed as 0.30*R + 0.59*G + 0.11*B. If a pixel's computed intensity is less than the ----ccccuuuuttttooooffffffff level it will print as white. This maps light-on-dark display images to black-on-white hardcopy. The default cutoff intensity is 50% of full brightness. Example: specifying ----ccccuuuuttttooooffffffff 88887777....5555 moves the white/black intensity point to 87.5% of full brightness. A LaserJet printer must be configured with sufficient memory to handle the image. For a full page at 300 dots per inch approximately 2MB of printer memory is required. Color images are produced on the PaintJet at 90 dots per inch. The PaintJet is limited to sixteen colors from its 330 color palette on each horizontal print line. _x_p_r will issue a warning message if more than sixteen colors are encountered on a line. _x_p_r will program the PaintJet for the first sixteen colors encountered on each line and use the nearest matching programmed value for other colors present on the line. Specifying the ----rrrrvvvv, reverse video, option for the PaintJet will cause black and white to be interchanged on the output image. No other colors are changed. Multiplane images must be recorded by _x_w_d in _Z_P_i_x_m_a_p format. Single plane (monochrome) images may be in either _X_Y_P_i_x_m_a_p or _Z_P_i_x_m_a_p format. Rev. Release 5 Page 5 XPR(1) AIX XPR(1) Some PCL printers do not recognize image positioning com- mands. Output for these printers will not be centered on the page and header and trailer strings may not appear where expected. The ----ggggaaaammmmmmmmaaaa and ----rrrreeeennnnddddeeeerrrr options are supported only on the PaintJet XL printers. The ----sssslllliiiiddddeeee option is not supported for LaserJet printers. The ----sssspppplllliiiitttt option is not supported for HP printers. The ----ggggrrrraaaayyyy option is not supported for HP or IBM printers. COPYRIGHT Copyright 1988, Massachusetts Institute of Technology. Copyright 1986, Marvin Solomon and the University of Wiscon- sin. Copyright 1988, Hewlett Packard Company. See _X(_1) for a full statement of rights and permissions. AUTHORS Michael R. Gretzinger, MIT Project Athena, Jose Capo, MIT Project Athena (PP3812 support), Marvin Solomon, University of Wisconsin, Bob Scheifler, MIT, Angela Bock and E. Mike Durbin, Rich Inc. (grayscale), Larry Rupp, HP (HP printer support). Rev. Release 5 Page 6