printer 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. #------------------------------------------------------------------------------
  2. # $File: printer,v 1.32 2022/12/26 17:25:19 christos Exp $
  3. # printer: file(1) magic for printer-formatted files
  4. #
  5. # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
  6. 0 string %! PostScript document text
  7. !:mime application/postscript
  8. !:apple ASPSTEXT
  9. >2 string PS-Adobe- conforming
  10. >>11 string >\0 DSC level %.3s
  11. >>>15 string EPS \b, type %s
  12. >>>15 string Query \b, type %s
  13. >>>15 string ExitServer \b, type %s
  14. >>>15 search/1000 %%LanguageLevel:\040
  15. >>>>&0 string >\0 \b, Level %s
  16. # Some PCs have the annoying habit of adding a ^D as a document separator
  17. 0 string \004%! PostScript document text
  18. !:mime application/postscript
  19. !:apple ASPSTEXT
  20. >3 string PS-Adobe- conforming
  21. >>12 string >\0 DSC level %.3s
  22. >>>16 string EPS \b, type %s
  23. >>>16 string Query \b, type %s
  24. >>>16 string ExitServer \b, type %s
  25. >>>16 search/1000 %%LanguageLevel:\040
  26. >>>>&0 string >\0 \b, Level %s
  27. 0 string \033%-12345X%!PS PostScript document
  28. # DOS EPS Binary File Header
  29. # From: Ed Sznyter <ews@Black.Market.NET>
  30. 0 belong 0xC5D0D3C6 DOS EPS Binary File
  31. >4 long >0 Postscript starts at byte %d
  32. >>8 long >0 length %d
  33. >>>12 long >0 Metafile starts at byte %d
  34. >>>>16 long >0 length %d
  35. >>>20 long >0 TIFF starts at byte %d
  36. >>>>24 long >0 length %d
  37. # Summary: Adobe's PostScript Printer Description File
  38. # Extension: .ppd
  39. # Reference: https://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf, Section 3.8
  40. # Submitted by: Yves Arrouye <arrouye@marin.fdn.fr>
  41. #
  42. 0 string *PPD-Adobe:\x20 PPD file
  43. >&0 string x \b, version %s
  44. !:ext ppd
  45. !:mime application/vnd.cups-ppd
  46. # HP Printer Job Language
  47. 0 string \033%-12345X@PJL HP Printer Job Language data
  48. # HP Printer Job Language
  49. # The header found on Win95 HP plot files is the "Silliest Thing possible"
  50. # (TM)
  51. # Every driver puts the language at some random position, with random case
  52. # (LANGUAGE and Language)
  53. # For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
  54. # From: Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
  55. #
  56. 0 string \033%-12345X@PJL HP Printer Job Language data
  57. >&0 string >\0 %s
  58. >>&0 string >\0 %s
  59. >>>&0 string >\0 %s
  60. >>>>&0 string >\0 %s
  61. #>15 string \ ENTER\ LANGUAGE\ =
  62. #>31 string PostScript PostScript
  63. # From: Stefan Thurner <thurners@nicsys.de>
  64. 0 string \033%-12345X@PJL
  65. >&0 search/10000 %! PJL encapsulated PostScript document text
  66. # Rick Richardson <rickrich@gmail.com>
  67. # For Fuji-Xerox Printers - HBPL stands for Host Based Printer Language
  68. # For Oki Data Printers - HIPERC
  69. # For Konica Minolta Printers - LAVAFLOW
  70. # For Samsung Printers - QPDL
  71. # For HP Printers - ZJS stands for Zenographics ZJStream
  72. 0 string \033%-12345X@PJL HP Printer Job Language data
  73. >0 search/10000 @PJL\ ENTER\ LANGUAGE=HBPL - HBPL
  74. >0 search/10000 @PJL\ ENTER\ LANGUAGE=HIPERC - Oki Data HIPERC
  75. >0 search/10000 @PJL\ ENTER\ LANGUAGE=LAVAFLOW - Konica Minolta LAVAFLOW
  76. >0 search/10000 @PJL\ ENTER\ LANGUAGE=QPDL - Samsung QPDL
  77. >0 search/10000 @PJL\ ENTER\ LANGUAGE\ =\ QPDL - Samsung QPDL
  78. >0 search/10000 @PJL\ ENTER\ LANGUAGE=ZJS - HP ZJS
  79. # Summary: Hewlett-Packard printer firmware update
  80. # From: Joerg Jenderek
  81. # URL: https://support.hp.com/us-en/drivers/selfservice/hp-envy-6000e-all-in-one-printer-series/2100187505/model/2100187513
  82. # Note: firmware update tested with ENVY 6000 All-in-One Printer
  83. 0 string @PJL\ ENTER\ LANGUAGE=FWUPDATE2 HP Printer firmware update
  84. #!:mime application/octet-stream
  85. #!:mime application/x-hp-firmware
  86. # https://ftp.hp.com/pub/softlib/software13/printers/en6000/2214/EN6000_2214B.exe
  87. # vasari_base_dist_pp1_001.2214B_nonassert_appsigned_lbi_rootfs_secure_signed.ful2
  88. !:ext ful2
  89. # HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
  90. 0 string \033E\033 HP PCL printer data
  91. >3 string \&l0A - default page size
  92. >3 string \&l1A - US executive page size
  93. >3 string \&l2A - US letter page size
  94. >3 string \&l3A - US legal page size
  95. >3 string \&l26A - A4 page size
  96. >3 string \&l80A - Monarch envelope size
  97. >3 string \&l81A - No. 10 envelope size
  98. >3 string \&l90A - Intl. DL envelope size
  99. >3 string \&l91A - Intl. C5 envelope size
  100. >3 string \&l100A - Intl. B5 envelope size
  101. >3 string \&l-81A - No. 10 envelope size (landscape)
  102. >3 string \&l-90A - Intl. DL envelope size (landscape)
  103. # IMAGEN printer-ready files:
  104. 0 string @document( Imagen printer
  105. # this only works if "language xxx" is first item in Imagen header.
  106. >10 string language\ impress (imPRESS data)
  107. >10 string language\ daisy (daisywheel text)
  108. >10 string language\ diablo (daisywheel text)
  109. >10 string language\ printer (line printer emulation)
  110. >10 string language\ tektronix (Tektronix 4014 emulation)
  111. # Add any other languages that your Imagen uses - remember
  112. # to keep the word `text' if the file is human-readable.
  113. # [GRR 950115: missing "postscript" or "ultrascript" (whatever it was called)]
  114. #
  115. # Now magic for IMAGEN font files...
  116. 0 string Rast RST-format raster font data
  117. >45 string >0 face %s
  118. # From Jukka Ukkonen
  119. 0 string \033[K\002\0\0\017\033(a\001\0\001\033(g Canon Bubble Jet BJC formatted data
  120. # From <mike@flyn.org>
  121. # These are the /etc/magic entries to decode data sent to an Epson printer.
  122. 0 string \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P Epson Stylus Color 460 data
  123. #------------------------------------------------------------------------------
  124. # zenographics: file(1) magic for Zenographics ZjStream printer data
  125. # Rick Richardson <rickrich@gmail.com>
  126. 0 string JZJZ
  127. >0x12 string ZZ Zenographics ZjStream printer data (big-endian)
  128. 0 string ZJZJ
  129. >0x12 string ZZ Zenographics ZjStream printer data (little-endian)
  130. #------------------------------------------------------------------------------
  131. # Oak Technologies printer stream
  132. # Rick Richardson <rickrich@gmail.com>
  133. 0 string OAK
  134. >0x07 byte 0
  135. >0x0b byte 0 Oak Technologies printer stream
  136. # This would otherwise be recognized as PostScript - nick@debian.org
  137. 0 string %!VMF SunClock's Vector Map Format data
  138. #------------------------------------------------------------------------------
  139. # HP LaserJet 1000 series downloadable firmware file
  140. 0 string \xbe\xefABCDEFGH HP LaserJet 1000 series downloadable firmware
  141. # From: Paolo <oopla@users.sf.net>
  142. # Epson ESC/Page, ESC/PageColor
  143. 0 string \x1b\x01@EJL Epson ESC/Page language printer data
  144. # Summary: Hewlett-Packard Graphics Language
  145. # From: Joerg Jenderek
  146. # URL: http://fileformats.archiveteam.org/wiki/HP-GL
  147. # https://en.wikipedia.org/wiki/HPGL
  148. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/h/hpg.trid.xml
  149. # Note: called "Hewlett-Packard Graphics Language" by TrID and
  150. # "Hewlett Packard Graphics Language" by DROID via PUID x-fmt/293 and
  151. # HPGL by XnView command `nconvert -info *`
  152. # initialize, start a plotting job
  153. 0 string IN;
  154. >0 use hpgl
  155. # fill.plt
  156. 0 string INPS
  157. >0 use hpgl
  158. # http://ftp.funet.fi/index/graphics/packages/hpgl2ps/hpgl2ps.tar.Z/hpgl2ps/test1.hpgl
  159. 0 string DF;
  160. >0 use hpgl
  161. # http://ftp.funet.fi/index/graphics/packages/hpgl2ps/hpgl2ps.tar.Z/hpgl2ps/test3.hpgl
  162. # Select Pen n
  163. 0 string SP
  164. >0 use hpgl
  165. # charsize.hp pages.hp set the scaling points (P1 and P2) to their default positions
  166. 0 string IP0
  167. >0 use hpgl
  168. # ci.hp
  169. 0 string CO\040
  170. >0 use hpgl
  171. # iw.hp 286x192.5_lh.hpg 286x192.5_lq.hpg
  172. 0 string PS\040
  173. >0 use hpgl
  174. # thick.hp
  175. 0 string PS9
  176. >0 use hpgl
  177. # ul.hp
  178. 0 string PS4
  179. >0 use hpgl
  180. # la.hp
  181. 0 string BP
  182. >0 use hpgl
  183. # miter.hp
  184. 0 string PA
  185. >0 use hpgl
  186. # pw.hpg number of pens x
  187. 0 string NP
  188. >0 use hpgl
  189. # win_1.hp
  190. #0 string \003INCA WHAT_IS_THAT
  191. #>0 use hpgl
  192. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/h/hpgl2.trid.xml
  193. # Note: called "Hewlett-Packard Graphics Language 2" by TrID
  194. 0 string \033%-1B Hewlett-Packard Graphics Language 2
  195. !:mime application/vnd.hp-HPGL
  196. # like: dt.plt
  197. !:ext plt
  198. #!:ext plt/gl2/hpg2/spl
  199. # remaining part after escsape sequnce
  200. >5 string x with "%-.10s"
  201. # display Hewlett-Packard Graphics Language vector graphic information
  202. 0 name hpgl
  203. >0 string x Hewlett-Packard Graphics Language
  204. #!:mime vector/x-hpgl
  205. # https://www.iana.org/assignments/media-types/application/vnd.hp-HPGL
  206. !:mime application/vnd.hp-HPGL
  207. # no example with HPL suffix found
  208. !:ext hpgl/hpg/hp/plt
  209. # like: "IN;" "DF;IN;LT;PU1000,1000;PD2000,10" "SP6;DI0,1;SR0.70,1.90;SC0,800,"
  210. # "CO Concentric circles drawn with different linewidths;"
  211. >0 string x \b, starting with "%-.54s"
  212. # continue but not for 1 long line without CR or LF
  213. >>&0 ubyte <0x0E
  214. #>>&0 ubyte <0x0E TERMINATOR=%x
  215. # second line after 1 terminator character
  216. >>>&0 string >\r with "%-.10s"
  217. # next character again CR or LF
  218. >>>&0 ubyte <0x0E
  219. #>>>&0 ubyte <0x0E 2ND_CHARACTER=%x
  220. # second line after 2 terminator characters
  221. >>>>&0 string >\r with "%-.10s"