Need help emulating an HP 2100 as a virtual printer

gihrig
gihrig used Ask the Experts™
on
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.

Environment:

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

Client:
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 datalink.center.local server
	
	Apply
	
	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"
 
Steps:
1. Set /var/SPOOL/* chown lp:lp, chmod 775
 
2. from: https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/153003
 
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 http://datalink.center.local:631/ 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!
 
http://ubuntuforums.org/showthread.php?p=1831119 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}.
   e.g. http://datalink.center.local:631/printers/PDF_virtual_printer
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.

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
nociSoftware Engineer
Distinguished Expert 2018
Commented:
That should be not too difficult, artifix als made GhostPDL (Like GhostScript) but it handles PCL:

http://www.artifex.com/downloads/


Author

Commented:
Hi noci,

I had not heard of GhostPDL, it does look promising. However, the licensing looks to be prohibitive in my case.

My application will be commercially distributed, in small quantities. This rules out the GPL and from what I can gather a GhostPDL OEM license starts at around $20,000/year which is out of the question for me. see: http://www.quickpdf.org/forum/printer_friendly_posts.asp?TID=168 and search for "Artifex".

I have written to Artifex asking about a license for small software vendors, but this seems doubtful and I am reluctant to invest time learning a product which I may not be able to use.

Thanks for your input!

Software Engineer
Distinguished Expert 2018
Commented:
Could you try to have the customers install the part "themselves", with you assisting in setting up their environment. That should be allowed in GPL.

GPL Software cannot be sold, but can be distributed... See RedHat, they charge for the service of maintaining linux not linux the kernel as such.
It would require you to supply all changes you make back to the builder.
Groundwork distributing nagios....

The price of your product should not change wether you do or do not use GhostPDL.

---
Think of it you make your own Distro...  'Linux Softprint', which can have a public part + ou adding something extra for your customers (overlay handling???). Output postprocessing support that might be missing in the basic "product"....

I think there should be a way to pull it off (IANAL btw.)

Author

Commented:
The actual problem was not solved, but the suggestions were helpful and I presume would lead to a solution should I decide to pursue it further.

The theoretical nature of the (only) solution has lead me to abandon this  approach and take different route to solving the problem.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial