Print To Pdf File Linux Console
This software I tested on Solaris 11.2 operating system can create that scheme which is called 2-up, usually used for hand-out at classrooms or meetings. It is possible to produce other schemes; for example, hand-out with 3 or 4 or more pages on one sheet or both sides of a sheet. It can be run from a terminal as it is a JAR file or just run the GUI for ease of access. Besides Solaris other Linux distributions are also compatible, running the software, as 'executable,' with super-user privileges. Be aware not using 'Open the Archive.' It is also working on any Windows and Mac where there is already a Java Runtime Environment (JRE) installed, as is the case most of the time. Software is and is free to download and to use.
Do not attempt to print non-text or non-Postscript files, though, because this can cause the printer to malfunction. See below for some printing solutions for other file types. If you would like to print an image file from Unix or Linux, you will need to open the file in an imaging program.
How do I print from Unix and Linux?For general information on using SEAS printers, please see:Command Line PrintingIf you're logged into a unix server or linux terminal, you may print textfiles or postscript files using the lpr command to print to thedefault printer, the Levine 164 queue. For example, to print atext file called hrsprn, type this command: lpr hrsprnIf you would like to print to a different printer in the system, follow thelpr command with -P followed immediately by the name of the printer.For example, to print the hrsprn file to the TowneM70 queue, type this command: lpr -PPay-to-printM70 hrsprnSimilarly, you may print to Levine 164 by typing: lpr -PPay-to-print169Color hrsprnThe lpr command also accepts files in the Postscript format. Donot attempt to print non-text or non-Postscript files, though, because this cancause the printer to malfunction. See below for some printing solutions forother file types. ImagesIf you would like to print an image file from Unix or Linux, you will needto open the file in an imaging program.
If the file is of a common internetformat, such as GIF or JPEG, it is probably easiest to use the your browser toopen the image and print it. Otherwise, the xv program should beused.
XV is a program written by Penn's own John Bradley, and is widely used tomanipulate images in Unix and Linux. To print the image, simply open it in XV,and hit the print button. You'll notice that the print dialogue box allows youto change the print command. Save Paper by Compressing OutputTo help conserve paper, we recommend that you try one of the available printcompression programs available on Eniac. MpageThe mpage command is the fastest and most simple way to savepaper on Eniac. To print the file hrsprn so that four pages areprinted on a single sheet of paper, type: mpage hrsprnThis will cause the document to be printed on the default printer in theCETS office. If this is too small to read, and you want to sent it to theprinter in Towne M70, use this command: mpage -2 -PPay-to-printM70 hrsprnIn this command, the 2 represents the number of pages of textto print per sheet of paper, and the P129 represents the name ofthe printer using the same syntax as the lpr command.
For moreinformation, type man mpage at the Eniac command prompt. EnscriptThe enscript command works basically the same way as mpage, butis much more customizable.
For information on using enscript, type manenscript at the command prompt. NOTE: Enscript onlyworks on text files, whereas Mpage works on both text and postscript files.Compressing Internet PrintoutsAs described above, web browsers allows you to change the command it uses toprint files. This functionality makes it possible to compress internetprintouts.
Command Print From Terminal
You can do this by clicking on 'File', selecting'Print.' , and replacing the lpr command with the print protocol youwould like to use. For example, if you would like to use mpage to print fourpages of text per sheet of paper, click on the box and replace: lprwith mpage -4 Piping PrintoutsMost text data can be printed by using a pipe ( ) in Unix or Linux. This isperformed by placing a pipe at the end of a command and following it with the'lpr' command. For example, to print a listing of the currentdirectory to the printer in Towne M70, enter the following command: ls lpr -PPay-to-printM70If you have a very large directory listing, and you would like to use thecomprehensive listing (-l) option of the directory, you can pipe to the mpageprogram to compress it to six pages per sheet of paper by entering this: ls -l mpage -6 Change the Default PrinterIf there is a printer that you plan on using more than the default one inthe CETS office in Levine 164, it may be in your best interest to change yourdefault printer. To do this, add the following lines to the end of your'.bashrc' file: PRINTER= printernameexport PRINTERChange printername to the name of the printer you wantto be your default. For example, to set your default printer to the Towne M70queue, the line in your.bashrc file should read: PRINTER=M70export PRINTERAfter you save this to the file, changes will not take effect until the nexttime you log in.
Linux Print Output To File
So log off and log back in to use the new printer.