Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using IPP/SMB with CUPS to print to file

Status
Not open for further replies.

lazyrunner50

Programmer
Jul 30, 2004
63
US
Ok, so I'm trying to get more familiar with CUPS, and I've been trying to figure out how to print to a file, and what exactly that is in the first place. I know that when you print to a file, you're not actually printing a file on a printer, but creating a document. Outside of that, I don't really know what it is.

Ideally I'd like to be able to print to a file on my Windows XP machine from my CentOS 5 (2.6.18-53.1.4.el5) machine. I've been using system-config-printer, and was guessing at the configuration.

1. Which do I use IPP/SMB to print to an XP machine?
2. If I try to use IPP, how can I specify the username/password to access the Windows machine. Also, what do I put for the address? (I was guessing ipp://<ip address>/printers/test with test being the name of the resulting file)
3. If I use SMB, I understand how I put in the username/password, but how do I specify the address (same problem as #2)
4. Is there any setup required on the XP machine? For instance, does there have to be a "test" file already on the machine?
 
You say you are attempting to send printer output from CentOS to an XP file? Try to the following;

1. Create a printer on XP and choose Local and select File as your printer port. Then share the printer
2. On the Linux side, I usually use Printtool from GUI based terminal which will help configure the appropriate /etc/printcap settings for you. Have it point to this print share
3. Print your document from CentOS

HTH
 
Not really...I'm not sure I really understand it, but I think you can just print to a file. For instance, if you're printing something off in Windows XP, but don't have a physical printer attached to your computer (locally or on the network), a default "printer" is set up which actually just creates a document on your computer.

I am trying to do the same through Linux. I've gotten to the point where I've added a generic "text-only printer", but can't figure out where to go from there.
 
I've not tried printing from CUPS to Windows via SMB, and it's probably fine, but an alternative that I have used is the LPD protocol.

You can create the CUPS print queue using this command:

[tt]lpadmin -p cupsqueuename -v /dev/null -i lpd://windowsservername/windowsqueuename[/tt]

Then configure LPD support in Windows by following my instructions in this post:


And then configure the 'print to file' printer on the Windows server as the other guys have described.

I'm sure there should be a way to print to file just using CUPS, but I don't know how off the top of my head. Possibly by just using an output filename as the parameter to the lpadmin -v option.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top