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