I often find myself needing to print webpages, and one of the most convenient ways of doing so is to print them as PDF files. Now, as I’m sure you’ll be unsurprised to know, this is possible without too much effort on the EEE, but, you might like a bit of hand-holding whilst you set it up. So, I took mkrishnan’s guide on EEEuser.com, and added some of my own steps to prevent overwriting of previously-printed files. As such, if you want to be able to print to PDF, and have each output file assigned a unique prefix to the name so that you never need worry about accidentally overwriting existing documents, then this guide is for you…
1.) You will need a standard repository available for adept (your package manager), to allow you to install the necessary printing software. If you have not already done so, you can add extra repositories directly to the sources.list file. You can get the relevant software for this QuickTip from the default Xandros repository, so, what you’d need to do is:
sudo nano /etc/apt/sources.list
And add the following line:
deb http://http.us.debian.org/debian stable main
Then, save your changes (Ctl+O, then Enter), and exit (Ctl+X)
2.) Install cups-pdf from the repository
sudo apt-get install cups-pdf
3.) Now it’s installed, you need to configure it, so that it creates a virtual printer for you:
- In FireFox, open http://localhost:631/
- Select “Add printer”
- Enter some text into each of the three fields. You can enter anything you wish- I’ve just used “cups-pdf”, as it seemed neat. Select “Continue”
- From the drop-down list, select “Virtual Printer (PDF)”. Select “Continue”
- From the drop-down list, select “Postscript”. Select “Continue”
- You will only have one option on this screen, so, select it, and then select “Add Printer”
Now, you have installed a PDF printer- if you hit Ctl+P, you can print directly to PDF. The output file will be stored at /home/user/PDF. In order to change the settings to give each printout a unique identifier, you will need to edit the cups-pdf configuration file. If you wish to take a backup of the file first, which is good practice, type:
sudo cp /etc/cups/cups-pdf.conf /etc/cups/cups-pdf.conf.bak
Now, edit the configuration file:
sudo nano /etc/cups/cups-pdf.conf
Look for the setting “Label”
Uncomment it, and change its value to “1”, so that the line reads
Label 1
Save the changes (Ctl+O), then exit (Ctl+X)
You should not need to restart cups for the changes to take effect, but, if you want to:
sudo /etc/init.d/cupsys restart
In cups-pdf.conf, you can change output path etc if you should wish to do so.
Printing PDFs on your EEE… enjoy 🙂
Neil