xref: /openbsd-src/usr.bin/file/magdir/printer (revision 0ee74395949c27152548431c5cb896cb486a0866)
1#	$OpenBSD: printer,v 1.7 2009/04/24 18:54:34 chl Exp $
2
3#------------------------------------------------------------------------------
4# printer:  file(1) magic for printer-formatted files
5#
6
7# PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
80	string		%!		PostScript document text
9!:mime	application/postscript
10>2	string		PS-Adobe-	conforming
11>>11	string		>\0		DSC level %.3s
12>>>15	string		EPS		\b, type %s
13>>>15	string		Query		\b, type %s
14>>>15	string		ExitServer	\b, type %s
15>>>15   search/1000		%%LanguageLevel:\
16>>>>&0	string		>\0		\b, Level %s
17# Some PCs have the annoying habit of adding a ^D as a document separator
180	string		\004%!		PostScript document text
19!:mime	application/postscript
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:\
26>>>>&0	string		>\0		\b, Level %s
270	string		\033%-12345X%!PS	PostScript document
28
29# DOS EPS Binary File Header
30# From: Ed Sznyter <ews@Black.Market.NET>
310       belong          0xC5D0D3C6      DOS EPS Binary File
32>4      long            >0              Postscript starts at byte %d
33>>8     long            >0              length %d
34>>>12   long            >0              Metafile starts at byte %d
35>>>>16  long            >0              length %d
36>>>20   long            >0              TIFF starts at byte %d
37>>>>24  long            >0              length %d
38
39# Adobe's PostScript Printer Description (PPD) files
40#       Yves Arrouye <arrouye@marin.fdn.fr>
41#
420      string          *PPD-Adobe:    PPD file
43>13    string          x              \b, ve
44
45# HP Printer Job Language
460	string		\033%-12345X@PJL	HP Printer Job Language data
47# HP Printer Job Language
48# The header found on Win95 HP plot files is the "Silliest Thing possible"
49# (TM)
50# Every driver puts the language at some random position, with random case
51# (LANGUAGE and Language)
52# For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
53# From: Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
54#
550	string		\033%-12345X@PJL	HP Printer Job Language data
56>&0	string		>\0			%s
57>>&0	string		>\0			%s
58>>>&0	string		>\0			%s
59>>>>&0	string		>\0			%s
60#>15	string		\ ENTER\ LANGUAGE\ =
61#>31	string		PostScript		PostScript
62
63# HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
640	string		\033E\033	HP PCL printer data
65>3	string		\&l0A		- default page size
66>3	string		\&l1A		- US executive page size
67>3	string		\&l2A		- US letter page size
68>3	string		\&l3A		- US legal page size
69>3	string		\&l26A		- A4 page size
70>3	string		\&l80A		- Monarch envelope size
71>3	string		\&l81A		- No. 10 envelope size
72>3	string		\&l90A		- Intl. DL envelope size
73>3	string		\&l91A		- Intl. C5 envelope size
74>3	string		\&l100A		- Intl. B5 envelope size
75>3	string		\&l-81A		- No. 10 envelope size (landscape)
76>3	string		\&l-90A		- Intl. DL envelope size (landscape)
77
78# IMAGEN printer-ready files:
790	string	@document(		Imagen printer
80# this only works if "language xxx" is first item in Imagen header.
81>10	string	language\ impress	(imPRESS data)
82>10	string	language\ daisy		(daisywheel text)
83>10	string	language\ diablo	(daisywheel text)
84>10	string	language\ printer	(line printer emulation)
85>10	string	language\ tektronix	(Tektronix 4014 emulation)
86# Add any other languages that your Imagen uses - remember
87# to keep the word `text' if the file is human-readable.
88# [GRR 950115:  missing "postscript" or "ultrascript" (whatever it was called)]
89#
90# Now magic for IMAGEN font files...
910	string		Rast		RST-format raster font data
92>45	string		>0		face %s
93# From Jukka Ukkonen
940	string		\033[K\002\0\0\017\033(a\001\0\001\033(g	Canon Bubble Jet BJC formatted data
95
96# From <mike@flyn.org>
97# These are the /etc/magic entries to decode data sent to an Epson printer.
980       string          \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P        Epson Stylus Color 460 data
99
100
101#------------------------------------------------------------------------------
102# zenographics:  file(1) magic for Zenographics ZjStream printer data
103# Rick Richardson  rickr@mn.rr.com
1040	string		JZJZ
105>0x12	string		ZZ		Zenographics ZjStream printer data (big-endian)
1060	string		ZJZJ
107>0x12	string		ZZ		Zenographics ZjStream printer data (little-endian)
108
109
110#------------------------------------------------------------------------------
111# Oak Technologies printer stream
112# Rick Richardson <rickr@mn.rr.com>
1130       string          OAK
114>0x07	byte		0
115>0x0b	byte		0	Oak Technologies printer stream
116
117# This would otherwise be recognized as PostScript - nick@debian.org
1180	string		%!VMF 		SunClock's Vector Map Format data
119
120#------------------------------------------------------------------------------
121# HP LaserJet 1000 series downloadable firmware file
1220	string	\xbe\xefABCDEFGH	HP LaserJet 1000 series downloadable firmware
123
124# From: Paolo <oopla@users.sf.net>
125# Epson ESC/Page, ESC/PageColor
1260	string	\x1b\x01@EJL	Epson ESC/Page language printer data
127