home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / printer / dvi2pcl.lha / pcl.h < prev    next >
C/C++ Source or Header  |  1992-11-25  |  5KB  |  183 lines

  1. /* $Log:    pcl.h,v $
  2.  * Revision 0.8  92/11/23  19:47:04  19:47:04  bt (Bo Thide')
  3.  * Fixed resolution bug. Portable downloading. Added/changed options. PJXL color support
  4.  * 
  5.  * Revision 0.7  92/11/13  02:41:19  02:41:19  bt (Bo Thide')
  6.  * More bug fixes and improvements. Support for PaintJet XL
  7.  * 
  8.  * Revision 0.6  92/11/10  21:48:45  21:48:45  bt (Bo Thide')
  9.  * Bug fixes. Added -R option. Better font handling.
  10.  * 
  11.  * Revision 0.5  92/11/09  16:25:52  16:25:52  bt (Bo Thide')
  12.  * Rewrite of dospecial.c. Extended \special support
  13.  * 
  14.  * Revision 0.4  92/11/08  02:46:08  02:46:08  bt (Bo Thide')
  15.  * Changed to portable bit manipulations. Replaced strrstr for non-POSIX compliant C. Fixed numerous bugs. Added support for more \special's.
  16.  * 
  17.  * Revision 0.3  92/08/24  12:45:30  12:45:30  bt (Bo Thide')
  18.  * Fixed 8 bit (dc font) support.
  19.  * 
  20.  * Revision 0.2  92/08/23  17:28:54  17:28:54  bt (Bo Thide')
  21.  * Source cleaned up.  Changed certain function calls.  Removed globals.
  22.  * 
  23.  * Revision 0.1  92/08/22  23:58:47  23:58:47  bt (Bo Thide')
  24.  * First Release.
  25.  *  */
  26.  
  27. #ifndef _DVI2PCL_PCL_INCLUDED
  28. #define _DVI2PCL_PCL_INCLUDED
  29.  
  30. /*
  31.  * HP LaserJet+/II printer commands (PCL4)
  32.  */
  33.  
  34. /* Specify char and download it */
  35. #define PCL4_CHAR_ID        "\033*c%dE\033(s%dW"
  36.  
  37. /* Reset the printer and define line termination */
  38. #define PCL4_CLEAN_PRINTER    "\033E\033&k2G"
  39.  
  40. /* Set the number of copies of the page(s) printed */
  41. #define PCL4_COPIES        "\033&l%dX"
  42.  
  43. /* Set rule a*b and draw it in solid black */
  44. #define PCL4_DRAWRULE        "\033*c%db%da0P"
  45.  
  46. /* Draw one row of pixels */
  47. #define PCL4_DRAWROW        "\033*b%dW"
  48.  
  49. /* Eject one page */
  50. #define PCL4_EJECT_PAGE        " \f"
  51.  
  52. /* End raster graphic mode */
  53. #define PCL4_END_RASTER        "\033*rB"
  54.  
  55. /* Download font descriptor (fd) */
  56. #define PCL4_FONT_DESCR        "\033)s%dW"
  57.  
  58. /* Specify font ID */
  59. #define PCL4_FONT_ID        "\033*c%dD"
  60.  
  61. /* Set graphic resolution */
  62. #define PCL4_GRAPHRES        "\033*t%sR"
  63.  
  64. /* Printer initialization (reset, presentation mode) */
  65. #define PCL4_INIT_PRINTER    "\033E\033*o1Q"
  66.  
  67. /* Select landscape mode */
  68. #define PCL4_LANDSCAPE        "\033&l1O"
  69.  
  70. /* Make font temporary (last ID) */
  71. #define PCL4_MAKE_FONT_TEMP    "\033*c4F"
  72.  
  73. /* Feed from manual feed slot */
  74. #define PCL4_MANUAL_FEED    "\033&l2H"
  75.  
  76. /* Move cursor h and v dots */
  77. #define PCL4_MOVE_POSITION    "\033*p%ldx%ldY"
  78.  
  79. /* Move cursor h dots */
  80. #define PCL4_MOVE_H_POSITION    "\033*p%ldX"
  81.  
  82. /* Move cursor v dots */
  83. #define PCL4_MOVE_V_POSITION    "\033*p%ldY"
  84.  
  85. /* Move cursor h and v dots relative */
  86. #define PCL4_MOVE_REL        "\033*p%+ldx%+ldY"
  87.  
  88. /* Move cursor h dots horzontally relative */
  89. #define PCL4_MOVE_HREL        "\033*p%+ldX"
  90.  
  91. /* Move cursor v dots vertically relative */
  92. #define PCL4_MOVE_VREL        "\033*p%+ldY"
  93.  
  94. /* Select portrait mode */
  95. #define PCL4_PORTRAIT        "\033&l0O"
  96.  
  97. /* Push cursor position onto stack */
  98. #define PCL4_PUSH        "\033&f0S"
  99.  
  100. /* Pop cursor position from stack */
  101. #define PCL4_POP        "\033&f1S"
  102.  
  103. /* Printer resolution in dpi */
  104. #define PCL4_RESOLUTION        "\033*t%dR"
  105.  
  106. /* Select font identifier */
  107. #define PCL4_SELECT_FONT    "\033(%dX"
  108.  
  109. /* Start raster graphics mode */
  110. #define PCL4_START_RASTER    "\033*r1A"
  111.  
  112. /* Switch to transparent mode */
  113. #define PCL4_TRANSP_MODE    "\033&p1X%c"
  114.  
  115.  
  116. /*
  117.  * Generic PCL5 commands
  118.  */
  119.  
  120. /* Set compresson mode: 0=Unencoded, 1=Run-length, 2=TIFF, 3=Delta Row */
  121. #define PCL5_COMPRESSION_MODE    "\033*b%dM"
  122.  
  123. /* HP-GL/2 horizontal plot size (inches) */
  124. #define PCL5_HPGL_HOR_PLOTSIZE    "\033*c%dK"
  125.  
  126. /* HP-GL/2 vertical plot size (inches) */
  127. #define PCL5_HPGL_VERT_PLOTSIZE    "\033*c%dL"
  128.  
  129. /* Enter HP-GL/2 mode. Pen to previous HP-GL/2 pen position */
  130. #define PCL5_HPGLMODE_HPGLPEN    "\033%%0B"
  131.  
  132. /* Enter HP-GL/2 mode. Pen to previous PCL pen position */
  133. #define PCL5_HPGLMODE_PCLPEN    "\033%%1B"
  134.  
  135. /* Enter PCL mode. Pen to previous PCL pen position */
  136. #define PCL5_PCLMODE_PCLPEN    "\033%%0A"
  137.  
  138. /* Enter PCL mode. Pen to previous HP-GL/2 pen position */
  139. #define PCL5_PCLMODE_HPGLPEN    "\033%%1A"
  140.  
  141. /* Set picture frame anchor point (PCL cursor position) */
  142. #define PCL5_PICTURE_ANCHOR    "\033*c0T"
  143.  
  144. /* Picture frame, horizontal size */
  145. #define PCL5_PICTURE_FRAME_HOR    "\033*c%dX"
  146.  
  147. /* Picture frame, vertical size */
  148. #define PCL5_PICTURE_FRAME_VERT    "\033*c%dY"
  149.  
  150. /* Select 0, 90, 180, or 270 degrees print direction */
  151. #define PCL5_PRINT_DIRECTION    "\033&a%dP"
  152.  
  153. /* Select reverse landscape mode */
  154. #define PCL5_REV_LANDSCAPE    "\033&l3O"
  155.  
  156. /* Select reverse portrait mode */
  157. #define PCL5_REV_PORTRAIT    "\033&l2O"
  158.  
  159.  
  160. /*
  161.  * HP PaintJet XL specific commands (PCL4)
  162.  */
  163.  
  164. /* Define the number of color planes to be used */
  165. #define PJXL_COLOR_PLANES    "\033*r%dU"
  166.  
  167. /* Draw one row of pixels in one of the color planes */
  168. #define PJXL_DRAWROW_PLANE    "\033*b%dV"
  169.  
  170. /* Assign red color */
  171. #define PJXL_SET_RED        "\033*v%dA"
  172.  
  173. /* Assign green color */
  174. #define PJXL_SET_GREEN        "\033*v%dB"
  175.  
  176. /* Assign blue color */
  177. #define PJXL_SET_BLUE        "\033*v%dC"
  178.  
  179. /* Set the text color */
  180. #define PJXL_TEXT_COLOR        "\033&v%dS"
  181.  
  182. #endif /* _DVI2PCL_MACROS_INCLUDED */
  183.