no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | old_pages:printing_tips [2011/02/09 11:47] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Printing Tips ====== | ||
+ | ===== Printer Name Changes and your .bashrc ===== | ||
+ | If you are having problems with command line printing it may be because your .bashrc is not using the correct printer name. | ||
+ | Have a look at your .bashrc file. Near the top there are some lines that set your default printer. | ||
+ | < | ||
+ | | ||
+ | [ -z " | ||
+ | faculty) | ||
+ | export PRINTER=" | ||
+ | lpstat -a $PRINTER > /dev/null 2>&1 || export PRINTER=${PRINTER}@spooler | ||
+ | ;; | ||
+ | *) | ||
+ | export PRINTER=" | ||
+ | lpstat -a $PRINTER > /dev/null 2>&1 || export PRINTER=${PRINTER}@spooler | ||
+ | ;; | ||
+ | esac | ||
+ | </ | ||
+ | |||
+ | ===== You are in control of your printout ===== | ||
+ | |||
+ | We have a central print spooler. | ||
+ | |||
+ | You can check on your print job, delete your job, restart it or move it to another one of our printers while it is on the spooler. | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | Your web browser may complain that the site certificate chain is incomplete. | ||
+ | |||
+ | ^DNS|mr43.cs.vassar.edu| | ||
+ | ^X509v3 Subject Key Identifier|63: | ||
+ | ^SHA1 Fingerprint|64: | ||
+ | ^MD5 Fingerprint|A6: | ||
+ | |||
+ | --- // | ||
+ | |||
+ | ===== Create PDF output from any program that can print ===== | ||
+ | |||
+ | Any of the CS Linux Desktops can produce a pdf file from any program that can print. Simply choose the printer called // | ||
+ | |||
+ | If you find you are using this feature you might want to create a link in your home directory as shown below replacing ``YOUR_ACCOUNT_NAME`` with //your account name//. | ||
+ | |||
+ | ln -s / | ||
+ | |||
+ | Once you do that, any time you send a file to the pdf virtual printer, you can find it (for the following day) in your pdf-printout directory | ||
+ | |||
+ | The pdf " | ||
+ | --- // | ||
+ | |||
+ | ===== Default Printer Not Set ===== | ||
+ | |||
+ | Some students have reported that they no longer have a default printer set when using their CS Linux account. This can cause problems when using programs like enscript to process your printout. | ||
+ | |||
+ | While you can give these programs a printer to use, there is no reason not to set a default for yourself. | ||
+ | |||
+ | ===== - See if you have a default set ===== | ||
+ | Let's see if a default is in fact set. | ||
+ | |||
+ | Open a terminal, in that terminal type: | ||
+ | |||
+ | echo $PRINTER | ||
+ | |||
+ | If it came back with a blank line, then you don't have a default printer set. | ||
+ | This is easy to fix. | ||
+ | |||
+ | ===== - Edit your .bashrc ===== | ||
+ | |||
+ | Use whatever editor you please (emacs, vim, gedit, whatever) to open your ~/.bash file. Originally, that file contained the following code which set your printer based on your group: | ||
+ | |||
+ | < | ||
+ | |||
+ | [ -z " | ||
+ | faculty) | ||
+ | export PRINTER=" | ||
+ | ;; | ||
+ | *) | ||
+ | export PRINTER=" | ||
+ | ;; | ||
+ | esac | ||
+ | |||
+ | </ | ||
+ | |||
+ | The above code looks if a printer is set and if not sets it. It sets a printer in the Department Office for faculty, everybody else gets set to a printer in the lab. If the above lines are not there you could just add them in, but you don't need to type that much. | ||
+ | |||
+ | ===== - Add a default Printer ===== | ||
+ | |||
+ | Since you already know where you want to print, you don't need the script to try and decide. All you need to do is add a line to set the printer you want for your default printer. There are two printers in the lab, they are called Asprey and Loaner. Once you decide which one you would like as your default printer ((Can' | ||
+ | |||
+ | < | ||
+ | export PRINTER=" | ||
+ | </ | ||
+ | or | ||
+ | < | ||
+ | export PRINTER=" | ||
+ | </ | ||
+ | |||
+ | Save the file. Exit the editor. | ||
+ | |||
+ | ===== - Log out and back in for it to take effect ===== | ||
+ | |||
+ | The next time you log in your printer will be set to the one you have selected. | ||
+ | |||
+ | You can check this by repeating the test in section 1. | ||
+ | |||
+ | |||
+ | ===== - This did not help ===== | ||
+ | If this procedure did not help, please mail me. | ||
+ | Tell me your account name and what you tried. I'll help you get it working. | ||
+ | |||
+ | -Greg | ||
+ | |||
+ | --- // | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Netbeans Can't print ===== | ||
+ | |||
+ | This is a known netbeans problem. | ||
+ | |||
+ | The problem is the result of the way netbeans trys to print, Petr Nejedly from NetBeans/ | ||
+ | |||
+ | As I wrote before, Java prints it as a sequence of line strokes for every | ||
+ | | ||
+ | as 1kB PER LETTER. | ||
+ | This is probably because Java has its own opinion how the letter glyphs | ||
+ | | ||
+ | some transformations on it (scaling, rotating, setting attributes, ...) | ||
+ | I didn't examined the Java printing APIs, but I don't think we can do | ||
+ | much with it. | ||
+ | |||
+ | Bottom line, the output is //really nasty// and gets rejected. | ||
+ | |||
+ | The best thing to do is save your file and print it from the command line outside of netbeans using ``enscript`` or ``a2ps``. | ||
+ | |||
+ | a2ps -2r foo.java | ||
+ | |||
+ | or | ||
+ | |||
+ | enscript -2r foo.java | ||
+ | |||
+ | |||
+ | These commands put 2 pages of output reduced and printed side by side (the //2//) in landscape layout (the //r//) and since the file ends in //.java// they will each use highlighting rules for java when they print. | ||
+ | |||
+ | --- // |