📄 hpijs-generator.in
字号:
#!@PERL@# -*- perl -*-# hpijs-generator - A generator for the foomatic XML files for HP's "hpijs"# inkjet printer driver (http://hplip.sourceforge.net/)## Copyright 2001-2007 Till Kamppeter <till.kamppeter@gmail.com>## This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License as# published by the Free Software Foundation; either version 2 of the# License, or (at your option) any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU# General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA# 02111-1307, USA.## File and path definitionsmy $mapfile = "./hpijs-printermap";my $kitdir = "./foomatic-db";# XML file templatesmy $hpijs_driver_xml ="<driver id=\"driver/hpijs\"> <name>hpijs</name> <url>http://hplip.sourceforge.net/</url> <supplier>Hewlett-Packard</supplier> <manufacturersupplied>HP|Apollo</manufacturersupplied> <!--not \"thirdpartysupplied\"--> <license>BSD</license> <freesoftware /> <!--not \"nonfreesoftware\"--> <supportcontacts> <supportcontact level=\"voluntary\" url=\"http://lists.sourceforge.net/mailman/listinfo/hplip-help\">HPLIP-Help Mailing List</supportcontact> <!--not level=\"commercial\"--> </supportcontacts> <shortdescription> <en> HP's IJS driver for most of their non-PostScript printers </en> </shortdescription> <functionality> <maxresx>1200</maxresx> <maxresy>1200</maxresy> <color /> <text>90</text> <lineart>90</lineart> <graphics>100</graphics> <photo>100</photo> <load></load> <speed>70</speed> </functionality> <execution> <nopjl /> <ijs /> <prototype>gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs%A%B%C -dIjsUseOutputFD%Z -sOutputFile=- -</prototype> </execution> <comments> <en> This driver is the first free driver issued by HP for their DeskJet and LaserJet printers. Since version 1.0.1 HP has put it under a BSD-like license without the restriction that it is only allowed to use the driver with HP printers, as it was the case for HPIJS 1.0 and earlier. So this driver is really free software now.<P> Since version 1.0 the driver uses the new IJS interface to plug in drivers into GhostScript without needing to recompile GhostScript, the driver is provided by an extra executable invoked by GhostScript which gets the raster data from GhostScript via shared memory, which is much faster than piping bitmap output into the standard input of the driver, in addition GhostScript can ask the driver for the capabilities of the printer/driver pair.<P> The quality of colour printing is much higher than the quality of the other drivers.<P> The quality on photo papers (in photo mode) is very high, especially for the newer models (beginning from the HP DeskJet 990C) which auto-detect the paper type by a hardware facility and so automatically switch between the normal colour mode and the photo mode. On the HP DeskJet 990C and newer there is also a 1200 dpi high resolution mode available, in which the image is interpolated to 2400x1200 dpi or even 4800x1200 dpi by the hardware, and so it gives excellent photo quality. In the new models 6- and 7-ink printing is also fully automatically handled by the hardware, so it works under free software with this driver and the user does not to switch a driver option according to the cartridges he is using. This driver is the only free one which supports more than 600 dpi on HP inkjet printers.<P> This driver supports also monochrome (PCL 5) and color (PCL 5c) laser printers with resolutions up to 600 dpi. Most laser printers with 1200 dpi understand usually PCL 6 or PostScript, so use the "pxlmono", "pxlcolor", "lj5gray", or "Postscript" drivers then. For Brother laser printers use the "hl1240"/"hl1250" drivers. Note that Epson's AcuLaser color printer series only emulates the monochrome PCL 5, not PCL 5c. So you have to use Epson's "alc..." drivers to print in color with them.<P> This driver supports also duplex (double-sided) printing and selection of the paper input tray, if the printer is appropriately equipped.<P> The driver execution data currently available on this site is for version 1.4 (or newer) of HPIJS and IJS 0.33 (available in GNU GhostScript 6.53, AFPL GhostScript 7.04, and ESP GhostScript 7.05.x). It does not necessarily work with older versions of HPIJS and IJS.<P> To improve black text output quality use KRGB support. KRGB support is available with HPIJS 1.6. KRGB provides image enhanced printing for black text and black line drawings which can not be done with current RGB based raster drivers. KRGB requires Ghostscript support. If your copy of Ghostscript does not support KRGB, a Ghostscript KRGB patch is included in the HPIJS package. KRGB support requires no foomatic data changes.<P> </en> </comments> <printers>\@\@PRINTERENTRIES\@\@ </printers></driver>";my $printerlist_xml = " <printer> <id>printer/\@\@PRINTERID\@\@</id>\@\@COMMENT\@\@\@\@FUNCTIONALITY\@\@\@\@PPDDEFAULTRESOLUTION\@\@ <margins>\@\@MARGINS\@\@ </margins> </printer>";my $ppd_default_resolution_xml =" <ppdentry> *DefaultResolution: \@\@RES\@\@dpi </ppdentry>";my $general_margins_xml = " <general> <unit>in</unit> <relative />\@\@MARGINVALUES\@\@ </general>";my $papersize_margins_xml = " <exception PageSize=\"\@\@PAPERSIZE\@\@\">\@\@MARGINVALUES\@\@ </exception>";my $left_margin_xml =" <left>\@\@LEFT\@\@</left>";my $right_margin_xml =" <right>\@\@RIGHT\@\@</right>";my $top_margin_xml =" <top>\@\@TOP\@\@</top>";my $bottom_margin_xml =" <bottom>\@\@BOTTOM\@\@</bottom>";my $hpijs_model_xml ="<option type=\"enum\" id=\"opt/hpijs-Model\"> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <arg_longname> <en>Model</en> </arg_longname> <arg_shortname> <en>Model</en><!-- backends only know <en> shortnames! --> </arg_shortname> <arg_execution> <arg_order>100</arg_order> <arg_spot>A</arg_spot> <arg_required /> <arg_substitution /> <arg_proto> %s</arg_proto> </arg_execution> <constraints>\@\@MODELCONSTRAINTS\@\@ </constraints> <enum_vals>\@\@MODELENUMVALS\@\@ </enum_vals></option>";my $hpijs_pagesize_xml = "<option type=\"enum\" id=\"opt/hpijs-PageSize\"> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <arg_longname> <en>Page Size</en> </arg_longname> <arg_shortname> <en>PageSize</en><!-- backends only know <en> shortnames! --> </arg_shortname> <arg_execution> <arg_group>General</arg_group> <arg_order>105</arg_order> <arg_spot>A</arg_spot> <arg_substitution /> <arg_proto>%s</arg_proto> </arg_execution> <constraints>\@\@PAGESIZECONSTRAINTS\@\@ </constraints> <enum_vals> <enum_val id=\"ev/hpijs-PageSize-Custom\"> <ev_longname> <en>Custom size</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>Custom</en> <!-- Until someone tells me how to learn the user locale in backends, the shortname must be monolingual in <en>! --> </ev_shortname> <ev_driverval> -dDEVICEWIDTHPOINTS=0 -dDEVICEHEIGHTPOINTS=0</ev_driverval> </enum_val>\@\@PAGESIZEENUMVALS\@\@ </enum_vals></option>";my $hpijs_quality_xml = "<option type=\"enum\" id=\"opt/hpijs-Quality\"> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <arg_longname> <en>Resolution, Quality, Ink Type, Media Type</en> </arg_longname> <arg_shortname> <!-- We do not take \"Resolution\" as short name here, as the choices --> <!-- of this option cannot be mapped to names like \"300dpi\", --> <!-- \"600x300dpi\", ... and the Adobe PPD specs require such names --> <!-- for the choices of the \"Resolution\" option --> <en>Quality</en><!-- backends only know <en> shortnames! --> </arg_shortname> <arg_execution> <arg_group>Extra</arg_group> <arg_order>100</arg_order> <arg_spot>B</arg_spot> <arg_substitution /> <arg_proto> -r%s</arg_proto> </arg_execution> <constraints>\@\@QUALITYCONSTRAINTS\@\@ </constraints> <enum_vals>\@\@QUALITYENUMVALS\@\@ </enum_vals></option>";my $hpijs_printoutmode_xml = "<option type=\"enum\" id=\"opt/hpijs-PrintoutMode\"> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <arg_longname> <en>Printout Mode</en> </arg_longname> <arg_shortname> <en>PrintoutMode</en><!-- backends only know <en> shortnames! --> </arg_shortname> <arg_execution> <arg_group>General</arg_group> <arg_order>10</arg_order> <arg_spot>B</arg_spot> <arg_composite /> <arg_proto>%s</arg_proto> </arg_execution> <constraints>\@\@PRINTOUTMODECONSTRAINTS\@\@ </constraints> <enum_vals>\@\@PRINTOUTMODEENUMVALS\@\@ </enum_vals></option>";my $hpijs_inputslot_xml = "<option type=\"enum\" id=\"opt/hpijs-InputSlot\"> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <arg_longname> <en>Media Source</en> </arg_longname> <arg_shortname> <en>InputSlot</en><!-- backends only know <en> shortnames! --> </arg_shortname> <arg_execution> <arg_group>General</arg_group> <arg_order>100</arg_order> <arg_spot>C</arg_spot> <arg_required /> <arg_substitution /> <arg_proto>,PS:MediaPosition=%s</arg_proto> </arg_execution> <constraints>\@\@INPUTSLOTCONSTRAINTS\@\@ </constraints> <enum_vals> <enum_val id=\"ev/hpijs-InputSlot-Default\"> <ev_longname> <en>Printer default</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>Default</en> <!-- Until someone tells me how to learn the user locale in backends, the shortname must be monolingual in <en>! --> </ev_shortname> <ev_driverval>7</ev_driverval> </enum_val> <enum_val id=\"ev/hpijs-InputSlot-PhotoTray\"> <ev_longname> <en>Photo Tray</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>PhotoTray</en> <!-- Until someone tells me how to learn the user locale in backends, the shortname must be monolingual in <en>! --> </ev_shortname> <ev_driverval>6</ev_driverval> </enum_val> <enum_val id=\"ev/hpijs-InputSlot-Manual\"> <ev_longname> <en>Manual Feeder</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>Manual</en> <!-- Until someone tells me how to learn the user locale in backends, the shortname must be monolingual in <en>! --> </ev_shortname> <ev_driverval>2</ev_driverval> </enum_val> <enum_val id=\"ev/hpijs-InputSlot-Envelope\"> <ev_longname> <en>Envelope Feeder</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>Envelope</en> <!-- Until someone tells me how to learn the user locale in backends, the shortname must be monolingual in <en>! --> </ev_shortname> <ev_driverval>3</ev_driverval> </enum_val> <enum_val id=\"ev/hpijs-InputSlot-MPTray\"> <ev_longname> <en>Multi Purpose Tray</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>MPTray</en> <!-- Until someone tells me how to learn the user locale in backends, the shortname must be monolingual in <en>! --> </ev_shortname> <ev_driverval>8</ev_driverval> </enum_val> <enum_val id=\"ev/hpijs-InputSlot-Upper\"> <ev_longname> <en>Upper Tray</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>Upper</en> <!-- Until someone tells me how to learn the user locale in backends, the shortname must be monolingual in <en>! --> </ev_shortname> <ev_driverval>1</ev_driverval> </enum_val> <enum_val id=\"ev/hpijs-InputSlot-Lower\"> <ev_longname> <en>Lower Tray</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>Lower</en> <!-- Until someone tells me how to learn the user locale in backends, the shortname must be monolingual in <en>! --> </ev_shortname> <ev_driverval>4</ev_driverval> </enum_val> <enum_val id=\"ev/hpijs-InputSlot-LargeCapacity\"> <ev_longname> <en>Large Capacity Tray</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>LargeCapacity</en> <!-- Until someone tells me how to learn the user locale in backends, the shortname must be monolingual in <en>! --> </ev_shortname> <ev_driverval>5</ev_driverval> </enum_val><enum_val id=\"ev/hpijs-InputSlot-CDDVDTray\"> <ev_longname> <en>CD or DVD Tray</en> </ev_longname> <!-- A multilingual <comments> block can appear here, too; it should be treated as documentation for the user. --> <ev_shortname> <en>CDDVDTray</en> <!-- Until someone tells me how to learn the user locale in
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -