cvs commit: hints hpdeskjet.txt

timothy at linuxfromscratch.org timothy at linuxfromscratch.org
Tue Feb 11 12:00:38 PST 2003


timothy     03/02/11 15:00:38

  Modified:    .        hpdeskjet.txt
  Log:
  Added optional a2ps-4.13b packags and changed build order.
  
  Revision  Changes    Path
  1.2       +211 -53   hints/hpdeskjet.txt
  
  Index: hpdeskjet.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/hpdeskjet.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- hpdeskjet.txt	10 Feb 2003 20:27:47 -0000	1.1
  +++ hpdeskjet.txt	11 Feb 2003 20:00:38 -0000	1.2
  @@ -7,7 +7,17 @@
   	and generating great printing results with text, graphics and photos.
   
   CHANGELOG:
  -	February 9th, 2003 - First edition
  +	February 11th, 2003
  +	 - added optional a2ps-4.13b package
  +	 - added base online location of this hint
  +	   (http://www.projectpontiac.com/hints/hpdeskjet.txt)
  +	February 10th, 2003
  +	 - added more dependencies
  +	 - changed build order of cups/ghostscript
  +	 - added printer configuration (resolutions, paper size, etc)
  +	 - added lots of miscellaneous info
  +	February 9th, 2003
  +	 - first edition
   
   HINT:
   	After spending endless days wading through the reams of printing
  @@ -27,8 +37,21 @@
   	to find an appropriate driver. You can find a comprehensive list of
   	drivers at http://www.linuxprinting.org
   
  +	The latest version of this hint can be found at:
  +	http://www.projectpontiac.com/hints/hpdeskjet.txt
  +
   REQUIREMENTS:
  -	Perl (should be part of a base LFS system)
  +	Perl - this is part of a base LFS system
  +
  +RECOMENDED:
  +	libjpeg-6b & libpng-1.2.5 - most people have installed these by now :)
  +	If you want Ghostscript to be able to handle images, you need these
  +	intalled before	you even begin this hint. Instructions for installing
  +	these libraries can be found at http://beyond.linuxfromscratch.org
  +
  +	zlib-1.1.4 - this is installed as part of LFS 4.0, so you most
  +	definitely should have it already. If not, have a look at the latest
  +	LFS book at http://www.linuxfromscratch.org
   
   DOWNLOADS:
   	CUPS-1.1.18 source
  @@ -41,50 +64,43 @@
   - ftp://ftp.gnu.org/gnu/ghostscript/gnu-gs-fonts-std-6.0.tar.gz
   - ftp://ftp.gnu.org/gnu/ghostscript/gnu-gs-fonts-other-6.0.tar.gz
   
  -	HPIJS Driver Source
  +	HPIJS Driver source
   - http://unc.dl.sourceforge.net/sourceforge/hpinkjet/hpijs-1.3.1.tar.gz
   
  +	a2ps-4.13b source (this is optional)
  +- ftp://ftp.gnu.org/gnu/a2ps/a2ps-4.13b.tar.gz
  +
   	cups-1.1.18 is the latest stable version of cups at the time of writing
  -	this hint. ESP Ghostscript-7.05.5 is REQUIRED for the HPIJS driver to
  -	work. GNU Ghostscript-7.05 and AFPL Ghostscript-8.00 did not work for
  -	me at all. If you've already installed Ghostscript-8.00 and don't know
  -	how to remove it, installing ESP Ghostscript-7.05.5 to the same
  -	directory should overwrite it (it did for me). The HPIJS driver is a
  -	free driver made available by HP. It's nice to see commercial hardware
  -	manufacturers showing support for their products under Linux :) Because
  -	of this, if I buy another printer in the near future, it'll likely be
  -	an HP model.
  +	this hint. If you have an older version of cups, you're strongly
  +	encouraged to upgrade. Recent prior versions of cups had some major
  +	bugs that could make printer management a nightmare.
  +
  +	ESP Ghostscript-7.05.5 is REQUIRED for the HPIJS driver to work. GNU
  +	Ghostscript-7.05 and AFPL Ghostscript-8.00 did not work for me at all.
  +	If you've already installed Ghostscript-8.00 and don't know how to
  +	remove it, installing ESP Ghostscript-7.05.5 to the same directory
  +	should overwrite it (it did for me).
  +
  +	The HPIJS driver is a free driver made available by HP. It's nice to see
  +	commercial hardware manufacturers showing support for their products
  +	under Linux :) Because of this, if I buy another printer in the near
  +	future, it'll likely be an HP model. The latest version of this driver
  +	supports most (if not all) of the features of almost every HP Deskjet
  +	printer made over the last few years, including 300 to 1200 dpi output,
  +	paper size, paper type, duplexing, and many others. This driver also
  +	supports many other HP printers, including Photo printers and many
  +	Laserjet printers. For a full list of supported printers, have a look at
  +	http://hpinkjet.sourceforge.net/productssupported.php
  +
  +	a2ps-4.13b is a "anything to postscript" convertor. It's necessary for
  +	printing out a sheet that lists all your printer's supported features,
  +	which is incredibly handy for printer configuration after everything is
  +	installed. I highly recomend it.
   
   INSTALL:
  -	First and foremost, we need to install ESP Ghostscript. For the most
  -	part, I followed the same installation instructions outlined for
  -	Ghostscript 8.00 in the BLFS book, with a couple minor changes:
  -
  -./configure --prefix=/usr --libexecdir=/usr/lib/gs \
  -	--sysconfdir=/etc/gs --enable-shared
  -	--with-omni=no --enable-static &&
  -make &&
  -make install
  -
  -	I used this command to ensure that ESP Ghostscript-7.05.5 would
  -	overwrite my previous installation of AFPL Ghostscript-8.00 (which
  -	wasn't doing anything right). Incidentally, using --enable-shared
  -	finally allowed my KDE ghostscript viewer (KGhostScript) to work
  -	properly. It never did before with AFPL Ghostscript-8.00.
  -
  -	Following this, we need to install the GNU Ghostscript fonts. To do
  -	this, issue the following commands:
  -
  -cd /usr/share/ghostscript
  -tar xvfz /path/to/gnu-gs-fonts-std-6.0.tar.gz
  -tar xvfz /path/to/gnu-gs-fonts-other-6.0.tar.gz
  -
  -	Replace /path/to/ with the appropriate path where you downloaded the
  -	font files to. This will create a "fonts" directory where all the new fonts are
  -	stored for use by Ghostscript.
  -
  -	Next we need to install cups-1.1.18. For this, I followed the BLFS book
  -	precisely. Install CUPS by running the following commands:
  +	First and foremost, we need to install cups-1.1.18. For this, I
  +	followed the BLFS book precisely. Install CUPS by running the following
  +	commands:
   
   ./configure &&
   make &&
  @@ -137,7 +153,7 @@
   # End $rc_base/init.d/cups startup script.
   EOF
   
  -	Then make it executable:
  +	Then make the startup script executable:
   
   chmod 0755 /etc/rc.d/init.d/cups
   
  @@ -165,9 +181,53 @@
   
   /etc/rc.d/init.d/cups start
   
  -	If everything is well at this point, we can proceed :) The next package
  -	we need to install is the HPIJS driver. Luckily, this is quick and
  -	simple:
  +	If everything is well at this point, we can proceed to install ESP
  +	Ghostscript. For the most part, I followed the same installation
  +	instructions outlined for Ghostscript 8.00 in the BLFS book, with a
  +	couple minor changes:
  +
  +./configure --prefix=/usr --libexecdir=/usr/lib/gs \
  +	--sysconfdir=/etc/gs --enable-shared
  +	--with-omni=no --enable-static &&
  +make &&
  +make install
  +
  +	I used this command to ensure that ESP Ghostscript-7.05.5 would
  +	overwrite my previous installation of AFPL Ghostscript-8.00 (which
  +	wasn't doing anything right). Incidentally, using --enable-shared
  +	finally allowed my KDE ghostscript viewer (KGhostScript) to work
  +	properly. It never did before with AFPL Ghostscript-8.00.
  +
  +	Following this, we need to install the GNU Ghostscript fonts. To do
  +	this, issue the following commands:
  +
  +cd /usr/share/ghostscript
  +tar xvfz /path/to/gnu-gs-fonts-std-6.0.tar.gz
  +tar xvfz /path/to/gnu-gs-fonts-other-6.0.tar.gz
  +
  +	Replace /path/to/ with the appropriate path where you downloaded the
  +	font files to (ie. /usr/src/. This will create a "fonts" directory where
  +	all the new fonts are stored for use by Ghostscript.
  +
  +	=======Optional=======
  +	At this point, you may also install the optional a2ps package, which
  +	helps tremendously when configuring your printer after it's been
  +	installed. This is how you install a2ps-4.13b:
  +
  +./configure --prefix=/usr --libexecdir=/usr/lib/a2ps \
  +    --sysconfdir=/etc/a2ps --localstatedir=/var \
  +    --with-medium=letter &&
  +make &&
  +make install
  +
  +	If you live in an area where A4 is the standard paper format, replace
  +	--with-medium=letter with --with-medium=a4 instead. You shouldn't need
  +	to configure anything unless you want to get fancy, the default settings
  +	worked fine for me.
  +	=======End Optional=======
  +
  +	The next package we need to install is the HPIJS driver. Luckily, this
  +	is quick and simple:
   
   ./configure &&
   make &&
  @@ -180,7 +240,7 @@
   
   	This should output the name and version of the driver. We're almost done
   	now :) The driver is in place, but cups has no clue how to use it.
  -	First, we need to download a small perl script that gets used by cups as
  +	We need to download a small perl script that gets used by cups as
   	a filter. You can get the script by entering this address into your
   	browser:
   
  @@ -277,14 +337,112 @@
   	command. If you need more information about the "lp" command, check out
   	its man page.
   
  +CONFIGURATION:
  +
   	The HPIJS driver allows you to change the quality of the print output,
  -	all the way up to 1200 dpi in full colour. However I'm not aware how to
  -	change this manually. I use the KDE Printing Manager to make such
  -	changes. I assume the Gnome equivalent also allows you to do this. If I
  -	ever figure out how to set the print options (print quality, paper size,
  -	duplexing, margins) manually, I'll add the information to this hint. At
  -	300 dpi (the default), the print quality is "adequate". But at 600 dpi
  -	and above, my printer is providing me with some stunning output!
  +	all the way up to 1200 dpi in full colour (assuming your printer
  +	supports that). Changing these options is as simple as passing them to
  +	the lp command. However, you first need to know what features your
  +	printer supports. If you want to find out what modes your printer
  +	supports, issue the following command:
  +
  +lp -o docs /etc/motd
  +
  +	The file specified is irrelevant, as long as it exists (it cannot be
  +	/dev/null). It won't actually get printed. Instead, your printer will
  +	print out a complete list of all the features it supports, as well as
  +	the current defaults. If you have more than one printer installed, then
  +	you'll have to specify which printer's features you want to see, like
  +	so:
  +
  +lp -d HP_Deskjet -o docs /etc/motd
  +
  +	Since my own printer is all I have to go on, I'll use that for the
  +	following examples;
  +
  +	My printer supports the following print modes:
  +
  +	- 300BestColorCMYK
  +	- 300ColorCMYK
  +	- 300DraftColorCMYK
  +	- 300DraftGrayscaleCMYK
  +	- 300GrayscaleCMYK
  +	- 300PhotoCMYK
  +	- 600BestColorCMYK
  +	- 600GrayscaleCMYK
  +	- 600PhotoCMYK
  +	- 1200PhotoCMYK
  +
  +	So when printing using the lp command, I simply pass an option to set
  +	the printing mode. Using the example above, to print the /etc/motd file
  +	in 300 dpi grayscale, I'd type the following command:
  +
  +lp -o Resolution=300GrayscaleCMYK /etc/motd
  +
  +	Or if I wanted to print an image in 600 dpi colour, I'd issue the
  +	following command:
  +
  +lp -o Resolution=600BestColorCMYK /opt/kde-3.1/share/wallpapers/alien-night.jpg
  +
  +	The "Photo" modes are typically intended for glossy or photo paper and
  +	don't provide very good results on plain paper. They also don't provide
  +	good results with text.
  +
  +	Similarly, you can set the paper size and type using the same switch.
  +	For example, my printer supports the following paper sizes:
  +
  +	- Letter
  +	- A4
  +	- A5
  +	- A6
  +	- B5JIS
  +	- Executive
  +	- FLSA
  +	- Hagaki
  +	- Legal
  +	- Oufuku
  +	- Photo
  +
  +	So to print onto Letter-sized paper, I'd run the following command:
  +
  +lp -o PageSize=Letter /etc/motd
  +
  +	Again, the different sizes of paper supported by your printer are listed
  +	on the printout we generated earlier.
  +
  +	You can specify multiple -o switches in the same command. If I wanted to
  +	print onto letter paper at 600 dpi in grayscale, I'd do it like this:
  +
  +lp -o Resolution=600GrayscaleCMYK -o PageSize=Letter /etc/motd
  +
  +	Of course, typing out all these options everytime you want to print a
  +	file can be tiresome and error-prone. So your best bet is to set some
  +	default values that will always be used unless you override them with
  +	-o switches. If most of your printing involves colour graphics (with or
  +	without text), then you'd most likely want to set 600 dpi colour as your
  +	printing default. Setting defaults is a simple command:
  +
  +lpoptions -o Resolution=600BestColorCMYK
  +
  +	You can also set multiple -o switches with the lpoptions command:
  +
  +lpoptions -o Resolution=600BestColorCMYK -o PageSize=Letter
  +
  +	After issuing this command, lp will always print in 600 dpi with full
  +	colour onto letter-sized paper, unless you override the defaults by
  +	including different -o switches. Typing lpoptions by itself on the
  +	command line will list your current defaults.
  +
  +	There are many other uses for the lpoptions command. If you need to know
  +	more, I recomend reading the lpoptions man page.
  +
  +	Using different front ends (ie. the KDE Printing Manager) allows you to
  +	change these defaults and settings interactively without having to deal
  +	with command lines. These front ends also make it a lot easier to deal
  +	with margins, orientation and printable areas. All of these settings can
  +	be adjusted using the lpoptions command, but explaining them all would
  +	require a complete How-To :) I highly recomend using one of the
  +	more advanced graphical front ends if you need more functionality.
   
   	I hope this was helpful to someone out there! If there's anything else
   	you think should be included in this hint, let me know.
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list