1*b6cee71dSXin LI 2*b6cee71dSXin LI#------------------------------------------------------------------------------ 3*b6cee71dSXin LI# $File: printer,v 1.26 2014/04/12 14:51:52 christos Exp $ 4*b6cee71dSXin LI# printer: file(1) magic for printer-formatted files 5*b6cee71dSXin LI# 6*b6cee71dSXin LI 7*b6cee71dSXin LI# PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com) 8*b6cee71dSXin LI0 string %! PostScript document text 9*b6cee71dSXin LI!:mime application/postscript 10*b6cee71dSXin LI!:apple ASPSTEXT 11*b6cee71dSXin LI>2 string PS-Adobe- conforming 12*b6cee71dSXin LI>>11 string >\0 DSC level %.3s 13*b6cee71dSXin LI>>>15 string EPS \b, type %s 14*b6cee71dSXin LI>>>15 string Query \b, type %s 15*b6cee71dSXin LI>>>15 string ExitServer \b, type %s 16*b6cee71dSXin LI>>>15 search/1000 %%LanguageLevel:\ 17*b6cee71dSXin LI>>>>&0 string >\0 \b, Level %s 18*b6cee71dSXin LI# Some PCs have the annoying habit of adding a ^D as a document separator 19*b6cee71dSXin LI0 string \004%! PostScript document text 20*b6cee71dSXin LI!:mime application/postscript 21*b6cee71dSXin LI!:apple ASPSTEXT 22*b6cee71dSXin LI>3 string PS-Adobe- conforming 23*b6cee71dSXin LI>>12 string >\0 DSC level %.3s 24*b6cee71dSXin LI>>>16 string EPS \b, type %s 25*b6cee71dSXin LI>>>16 string Query \b, type %s 26*b6cee71dSXin LI>>>16 string ExitServer \b, type %s 27*b6cee71dSXin LI>>>16 search/1000 %%LanguageLevel:\ 28*b6cee71dSXin LI>>>>&0 string >\0 \b, Level %s 29*b6cee71dSXin LI0 string \033%-12345X%!PS PostScript document 30*b6cee71dSXin LI 31*b6cee71dSXin LI# DOS EPS Binary File Header 32*b6cee71dSXin LI# From: Ed Sznyter <ews@Black.Market.NET> 33*b6cee71dSXin LI0 belong 0xC5D0D3C6 DOS EPS Binary File 34*b6cee71dSXin LI>4 long >0 Postscript starts at byte %d 35*b6cee71dSXin LI>>8 long >0 length %d 36*b6cee71dSXin LI>>>12 long >0 Metafile starts at byte %d 37*b6cee71dSXin LI>>>>16 long >0 length %d 38*b6cee71dSXin LI>>>20 long >0 TIFF starts at byte %d 39*b6cee71dSXin LI>>>>24 long >0 length %d 40*b6cee71dSXin LI 41*b6cee71dSXin LI# Summary: Adobe's PostScript Printer Description File 42*b6cee71dSXin LI# Extension: .ppd 43*b6cee71dSXin LI# Reference: http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf, Section 3.8 44*b6cee71dSXin LI# Submitted by: Yves Arrouye <arrouye@marin.fdn.fr> 45*b6cee71dSXin LI# 46*b6cee71dSXin LI0 string *PPD-Adobe:\x20 PPD file 47*b6cee71dSXin LI>&0 string x \b, version %s 48*b6cee71dSXin LI 49*b6cee71dSXin LI# HP Printer Job Language 50*b6cee71dSXin LI0 string \033%-12345X@PJL HP Printer Job Language data 51*b6cee71dSXin LI# HP Printer Job Language 52*b6cee71dSXin LI# The header found on Win95 HP plot files is the "Silliest Thing possible" 53*b6cee71dSXin LI# (TM) 54*b6cee71dSXin LI# Every driver puts the language at some random position, with random case 55*b6cee71dSXin LI# (LANGUAGE and Language) 56*b6cee71dSXin LI# For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10 57*b6cee71dSXin LI# From: Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de> 58*b6cee71dSXin LI# 59*b6cee71dSXin LI0 string \033%-12345X@PJL HP Printer Job Language data 60*b6cee71dSXin LI>&0 string >\0 %s 61*b6cee71dSXin LI>>&0 string >\0 %s 62*b6cee71dSXin LI>>>&0 string >\0 %s 63*b6cee71dSXin LI>>>>&0 string >\0 %s 64*b6cee71dSXin LI#>15 string \ ENTER\ LANGUAGE\ = 65*b6cee71dSXin LI#>31 string PostScript PostScript 66*b6cee71dSXin LI 67*b6cee71dSXin LI# From: Stefan Thurner <thurners@nicsys.de> 68*b6cee71dSXin LI0 string \033%-12345X@PJL 69*b6cee71dSXin LI>&0 search/10000 %! PJL encapsulated PostScript document text 70*b6cee71dSXin LI 71*b6cee71dSXin LI# Rick Richardson <rickrich@gmail.com> 72*b6cee71dSXin LI 73*b6cee71dSXin LI# For Fuji-Xerox Printers - HBPL stands for Host Based Printer Language 74*b6cee71dSXin LI# For Oki Data Printers - HIPERC 75*b6cee71dSXin LI# For Konica Minolta Printers - LAVAFLOW 76*b6cee71dSXin LI# For Samsung Printers - QPDL 77*b6cee71dSXin LI# For HP Printers - ZJS stands for Zenographics ZJStream 78*b6cee71dSXin LI0 string \033%-12345X@PJL HP Printer Job Language data 79*b6cee71dSXin LI>0 search/10000 @PJL\ ENTER\ LANGUAGE=HBPL - HBPL 80*b6cee71dSXin LI>0 search/10000 @PJL\ ENTER\ LANGUAGE=HIPERC - Oki Data HIPERC 81*b6cee71dSXin LI>0 search/10000 @PJL\ ENTER\ LANGUAGE=LAVAFLOW - Konica Minolta LAVAFLOW 82*b6cee71dSXin LI>0 search/10000 @PJL\ ENTER\ LANGUAGE=QPDL - Samsung QPDL 83*b6cee71dSXin LI>0 search/10000 @PJL\ ENTER\ LANGUAGE\ =\ QPDL - Samsung QPDL 84*b6cee71dSXin LI>0 search/10000 @PJL\ ENTER\ LANGUAGE=ZJS - HP ZJS 85*b6cee71dSXin LI 86*b6cee71dSXin LI 87*b6cee71dSXin LI# HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com) 88*b6cee71dSXin LI0 string \033E\033 HP PCL printer data 89*b6cee71dSXin LI>3 string \&l0A - default page size 90*b6cee71dSXin LI>3 string \&l1A - US executive page size 91*b6cee71dSXin LI>3 string \&l2A - US letter page size 92*b6cee71dSXin LI>3 string \&l3A - US legal page size 93*b6cee71dSXin LI>3 string \&l26A - A4 page size 94*b6cee71dSXin LI>3 string \&l80A - Monarch envelope size 95*b6cee71dSXin LI>3 string \&l81A - No. 10 envelope size 96*b6cee71dSXin LI>3 string \&l90A - Intl. DL envelope size 97*b6cee71dSXin LI>3 string \&l91A - Intl. C5 envelope size 98*b6cee71dSXin LI>3 string \&l100A - Intl. B5 envelope size 99*b6cee71dSXin LI>3 string \&l-81A - No. 10 envelope size (landscape) 100*b6cee71dSXin LI>3 string \&l-90A - Intl. DL envelope size (landscape) 101*b6cee71dSXin LI 102*b6cee71dSXin LI# IMAGEN printer-ready files: 103*b6cee71dSXin LI0 string @document( Imagen printer 104*b6cee71dSXin LI# this only works if "language xxx" is first item in Imagen header. 105*b6cee71dSXin LI>10 string language\ impress (imPRESS data) 106*b6cee71dSXin LI>10 string language\ daisy (daisywheel text) 107*b6cee71dSXin LI>10 string language\ diablo (daisywheel text) 108*b6cee71dSXin LI>10 string language\ printer (line printer emulation) 109*b6cee71dSXin LI>10 string language\ tektronix (Tektronix 4014 emulation) 110*b6cee71dSXin LI# Add any other languages that your Imagen uses - remember 111*b6cee71dSXin LI# to keep the word `text' if the file is human-readable. 112*b6cee71dSXin LI# [GRR 950115: missing "postscript" or "ultrascript" (whatever it was called)] 113*b6cee71dSXin LI# 114*b6cee71dSXin LI# Now magic for IMAGEN font files... 115*b6cee71dSXin LI0 string Rast RST-format raster font data 116*b6cee71dSXin LI>45 string >0 face %s 117*b6cee71dSXin LI# From Jukka Ukkonen 118*b6cee71dSXin LI0 string \033[K\002\0\0\017\033(a\001\0\001\033(g Canon Bubble Jet BJC formatted data 119*b6cee71dSXin LI 120*b6cee71dSXin LI# From <mike@flyn.org> 121*b6cee71dSXin LI# These are the /etc/magic entries to decode data sent to an Epson printer. 122*b6cee71dSXin LI0 string \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P Epson Stylus Color 460 data 123*b6cee71dSXin LI 124*b6cee71dSXin LI 125*b6cee71dSXin LI#------------------------------------------------------------------------------ 126*b6cee71dSXin LI# zenographics: file(1) magic for Zenographics ZjStream printer data 127*b6cee71dSXin LI# Rick Richardson <rickrich@gmail.com> 128*b6cee71dSXin LI0 string JZJZ 129*b6cee71dSXin LI>0x12 string ZZ Zenographics ZjStream printer data (big-endian) 130*b6cee71dSXin LI0 string ZJZJ 131*b6cee71dSXin LI>0x12 string ZZ Zenographics ZjStream printer data (little-endian) 132*b6cee71dSXin LI 133*b6cee71dSXin LI 134*b6cee71dSXin LI#------------------------------------------------------------------------------ 135*b6cee71dSXin LI# Oak Technologies printer stream 136*b6cee71dSXin LI# Rick Richardson <rickrich@gmail.com> 137*b6cee71dSXin LI0 string OAK 138*b6cee71dSXin LI>0x07 byte 0 139*b6cee71dSXin LI>0x0b byte 0 Oak Technologies printer stream 140*b6cee71dSXin LI 141*b6cee71dSXin LI# This would otherwise be recognized as PostScript - nick@debian.org 142*b6cee71dSXin LI0 string %!VMF SunClock's Vector Map Format data 143*b6cee71dSXin LI 144*b6cee71dSXin LI#------------------------------------------------------------------------------ 145*b6cee71dSXin LI# HP LaserJet 1000 series downloadable firmware file 146*b6cee71dSXin LI0 string \xbe\xefABCDEFGH HP LaserJet 1000 series downloadable firmware 147*b6cee71dSXin LI 148*b6cee71dSXin LI# From: Paolo <oopla@users.sf.net> 149*b6cee71dSXin LI# Epson ESC/Page, ESC/PageColor 150*b6cee71dSXin LI0 string \x1b\x01@EJL Epson ESC/Page language printer data 151