troubleshooting Question

Need help emulating an HP 2100 as a virtual printer

Avatar of gihrig
gihrigFlag for United States of America asked on
LinuxLinux Distributions
4 Comments2 Solutions651 ViewsLast Modified:
Setting up a virtual PDF printer on Ubuntu 8.04 STS Server using CUPS and CUPS-PDF.

The ultimate goal:

Create a virtual emulation of an HP Laserjet 2100 that accepts and processes form overlays, writing the resulting composit document to a PDF file on an Ubuntu linux machine on the local network.

Our Accounting system prints checks using a Form Overlay which is sent to an HP Laserjet 2100 ahead of the actual data to be printed. We have a need to capture the composite image (data plus overlay) as a PDF file on a remote linux server.


Print Server:
Ubuntu 8.04 LTS
Runnng on a VMWare virtual server.

Windows XP

My first approach to this problem was to set up cups-pdf on the linux box, but I have not been able to make that work statisfactorily.

The command line setup proved to be unproductive (after two+ days!).

Below are my notes on the procedure I followed to install a "minimal" Gnome and configure cups-pdf.

sudo aptitude update
### sudo aptitude install gnome gdm (better than "ubuntu-desktop" - 2 GB, but still 1.5GB!)
sudo aptitude install gnome-core gdm (795 MB!) But no print options :-(
Move the gdm start script to prevent Gnome from starting automatically
	mv /etc/init.d/gdm /root/gdm
	As root, type "startx" to start Gnome as an 'X' process. (System > Quit > Logout returns to prompt).
	As root, type "gdm" to start Gnome with full OS control (Cannot logout (quit Gnome), only restart/shutdown).
Install PDF virtual printer support
	System > Administration > Synaptic Package Manager
	Search for "cups-pdf"
	Search for "lpr"
Install Printer Configuration GUI
	Applications > Add/Remove > System Tools - Search for Print
	Install "Printer Configuration GUI"
Install Printer
	System > Administration > Printing
	- New Printer
	- Devices: Print into PDF file (keep default URI)
	- Makes: HP
	- Models: Laserjet 2100 (keep default driver)
	- Printer Name: PDF_virtual_printer
	- PDF virtual Printer
	- Location server
	Basic Server Settings: Check "Share published printers connected to this system".
Trouble shooting:
"Print test page" button label changes to "Cancel Tests" an appears to hang there.
A 779 byte file with no readable data is created at /var/spool/cups.
/var/log/messages contains:
Oct 22 08:48:12 datalink kernel: [64506.669293] audit(1256226492.041:14): type=1503 operation="inode_permission" requested_mask="a::" denied_mask="a::" name="/dev/tty" pid=11027 profile="/usr/sbin/cupsd" namespace="default"
Oct 22 08:48:16 datalink kernel: [64511.533621] audit(1256226496.911:15): type=1503 operation="capable" name="dac_override" pid=11032 profile="/usr/lib/cups/backend/cups-pdf" namespace="default"
Oct 22 08:48:16 datalink kernel: [64511.534418] audit(1256226496.911:16): type=1503 operation="capable" name="dac_read_search" pid=11032 profile="/usr/lib/cups/backend/cups-pdf" namespace="default"
1. Set /var/SPOOL/* chown lp:lp, chmod 775
2. from:
Marc Quinton wrote on 2008-03-07:
Ubuntu 7.10 introduces an additional security layer called AppArmor, whose support for CUPS printing is not yet complete. This will result in printing failures in certain corner cases described below. The workaround in each of these cases is to disable the AppArmor CUPS profile by running 
	sudo aa-complain cupsd. 
AppArmor support may be re-enabled by running 
	sudo aa-enforce cupsd.
The above did not help. CUPS admin pages appear at but don't work.
- Seems to be no way to login from admin pages, no prompt...
- Admin tab (and various direct admin buttons) returns a 403 - Forbiden.
- Can see print jobs, all show "Completed", even the ones that didn't print.
- Test Page _does_ print to /var/spool.cups-pdf/ANNONYMOUS
Not happy with this solution, but it's farther than I got before! has a very detailed How To, but it's for Ubuntu 6.10
Setting up a new Windows printer:
1. Create a new network printer.
2. Connect to a printer on the Internet ...
   URL: http://{server}:631/printers/{printer name}.
4. Select Manufacturer and Model: HP / HP Laserjet 2100.
5. Printer Name: Virtual PDF on DataLink.
6. Do not share, Not default, Print Test page. 
Bugs: Some programs (Opera) may print zero length files.
Works with "Generic/Text Only" printer on server and workstation, but HP 2100 produces blank pdf docs.
nociSoftware Engineer
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros