PrimoPDF --- Free PDF generator in Windows OS
PrimoPDF is a free tool for high-quality PDF creation, comprising a user-friendly interface that enables printing to PDF from virtually any Windows application. Additionally, PrimoPDF provides the ability to optimize PDF output for screen, print, ebook, and prepress, secure PDF files with 40- or 128-bit encryption, and add document information (e.g. title, author, subject, keywords) to converted PDF files.
http://www.primopdf.com/
An introduction to command line editors
Written by Jem Matzan
At some point in your GNU/Linux or BSD adventures, you're going to have to use a command-line text editor. Some of them are pretty easy to use but have few features. Others are powerful but require a study session with the tutorial file to learn how to operate them. Most often you just need a text editor to edit a couple of config files and don't want to spend 45 minutes working through a tutorial. How about a crash course to get you going?
All text editors share two common qualities: they will open a file if you type its path and name in after the program name, and they will reserve changing the file until you tell it to. So to edit your /etc/shells file with any of the editors in this article, you'd type something like this:
nano /etc/shells
or if you're already in the /etc directory, you can forgo the path:
nano shells
Once in the editor, none of your changes will be applied until you save the file. If you try to quit before you've saved the file, the editor will usually ask you if you want to save it first.
The easy ones
In GNU/Linux, you can sometimes find simple command line text editors like Pico and its GNU brother Nano.
Pico is an acronym for the PIne COmposer -- Pine being a command-line email client that is sometimes installed by default in GNU/Linux distributions. If you have Pine, you have Pico. Pico and Nano share most of their commands, and are pretty easy to use:
* To save a file, press Ctrl-o
* To quit, press Ctrl-x
* To perform a simple search, press Ctrl-w and type in the search string
You do not have to do anything to start editing text once the program is open -- just start typing as you would in a word processor. If a line is too long for your terminal window, it will have a $ at the end of the line and you'll have to use the arrow keys to scroll over to the latter portion of the line. You can also move down to the line below the extended line and hit the left arrow, which will bring you to the last character in the previous line.
You'll probably notice that the most important commands are listed in a bar at the bottom of the terminal screen, so if you forget what command does what, you can glance down and find out.
FreeBSD has a simple editor called ee in the base system, and it's extremely easy to use. Just press the Escape key and a menu will pop up offering you various file functions. To get rid of the menu, hit the Esc key again. As with Nano and Pico, you just start typing once the program is open.
To start Nano, Pico, or ee, just type its name in lowercase letters at the command line and press Enter.
vi and Emacs all over
The vi editor is practically universal, especially in the Unix and BSD worlds. Many operating systems package either vi or an enhanced edition of vi -- usually Vim -- with their base system. vi is much more difficult to learn and use than Pico, Nano, or ee, but it is able to do more. Many people use vi as a tool for writing and editing programs and Web pages and composing email as well as everyday editing.
Unlike the easier editors, vi won't let you start typing right away. Here are the commands you need to know to use vi and Vim for quick editing jobs:
* Press i to enter "insert mode," which allows you to type and erase text
* Press Escape to exit "insert mode"
* Press colon and then type w and press Enter to save a file, as in:
:w
* Press the d key twice to delete a line
* Press the / key and then enter a search string to perform a search
* Press the o key to skip to the next line, insert a line break, and enter "insert mode"
* Type in :q and press enter to quit
* To save and then quit, type :wq and press Enter
* To quit without saving, type :q! and press Enter
Remember to exit insert mode before you try to execute other commands.
Emacs is a similarly archaic editor, but its command execution structure is totally different. Instead of typing letters or prefacing a command with a colon, Emacs works with key combinations. Once you open a file you can just start typing and editing, so it's a little bit easier to use if you're not used to complex text editors. Here are the pertinent commands:
* Press Ctrl-x and then Ctrl-s to save a file
* Press Ctrl-x and then Ctrl-c to quit
* Press Ctrl-s and then type in a search string to perform a search
Vim, vi, and Emacs are all started from the command line by typing their name in lowercase letters and pressing Enter. If lines are too long for the screen, Emacs will put a \ at the end of the line and continue it below the line. vi will not mark the end of the too-long line, but will continue it below that line.
Merge several pdf files into one
PDFjam is a small collection of shell scripts which provide a simple interface to some of the functionality of the excellent pdfpages package (by Andreas Matthias) for pdfLaTeX. At present the utilities available are:
* pdfnup, which allows PDF files to be "n-upped" in roughly the way that psnup does for PostScript files.
* pdfjoin, which concatenates the pages of multiple PDF files together into a single file
* pdf90, which rotates the pages of one or more PDF files through 90 degrees (anti-clockwise).
In every case, source files are left unchanged.
A potential drawback of these utilities is that any hyperlinks in the source PDF are lost. On the positive side, there is no appreciable degradation of image quality in processing PDF files with thse programs, unlike some other indirect methods such as pdf2ps | psnup | ps2pdf (in the author's experience). [Better than the rather indirect approach taken here would be filters that work directly on the PDF code, to produce output files with hyperlinks intact.]
These tools are designed for Unix-like systems, including Mac OS X. I am told that pdfnup works fine also on Windows computers with MikTeX and the cygwin unix tools; I know of no reason why pdfjoin and pdf90 should not also work in that way.
An alternative set of PDF manipulation tools, which are java-based, is provided by the Multivalent project. They do much the same things as PDFjam, and quite a bit more. Hyperlinks don't seem to be preserved there either, though, when n-upping a document.
For Mac OS X, n-up with a more visual interface is provided by PDF Nup Maker. Like PDFjam, this is a front end to pdflatex/pdfpages.
The PDFjam software is made available free, under GPL version 2 (see the file named COPYING that is included with the package). It comes with ABSOLUTELY NO WARRANTY of fitness for any purpose whatever.
Pre-requisites
1. A Unix-like operating system (Linux, Mac OS X, Solaris, etc.)
2. A working, up-to-date installation of pdfTeX (including pdflatex and an up-to-date copy of pdftex.def)
3. A working installation of the LaTeX package pdfpages (version 0.2e or later)
Download
Download the shell scripts as pdfjam_1.20.tgz.
Bernhard Walle has kindly made available an RPM package for Linux. Eduard Bloch has kindly packaged PDFjam for Debian. Paul Chvostek has kindly made a port to FreeBSD.
For Mac OS X droplets, see below.
PDFjam is a project at freshmeat: please subscribe there to receive update announcements.
Installation/configuration
Look at the small block of lines flagged CONFIGURATION in each of the scripts. The main requirement is to provide the correct path to pdflatex on your system. If pdflatex is in your search path (as it ought to be), no change should be needed. Also set here are defaults for paper size etc. These settings can be changed by editing the scripts themselves, or (better) by putting them in a site-configuration file (at /etc/pdfnup.conf, /usr/share/etc/pdfnup.conf, /usr/local/share/pdfnup.conf, or /usr/local/etc/pdfnup.conf) and/or a user-defaults file ~/.pdfnup.conf to be read in that order when any of pdfnup, pdfjoin or pdf90 runs (if present these configuration files will override corresponding settings found in the scripts themselves). For example, if you want your own output to be on "US letter" size paper by default, simply put the line
paper=letterpaper
in a plain text file named file .pdfnup.conf in your home directory.
Make sure that the scripts are executable by all who might need to execute them. If they are to be available to all users on your system, perhaps move them to /usr/local/bin (or make symbolic links to them there). The man pages should be installed on the MANPATH of all who need to read them.
Using the scripts
Once the scripts are installed, help on usage can be obtained by
pdfnup --help
pdfjoin --help
pdf90 --help
Some examples:
For pdfnup,
pdfnup mywork/wasteful.pdf --nup 2x2
will produce a new 4-up file wasteful-2x2.pdf in directory mywork , and
pdfnup mywork/wasteful.pdf --nup 2x1 --outfile mywork2/halfthewaste.pdf
produces a 2-up file halfthewaste.pdf in directory mywork2. The source pdf file wasteful.pdf is left unchanged.
pdfnup file1.pdf file2.pdf --frame true --nup 2x2
makes new files file1-2x2.pdf and file2-2x2.pdf in the current directory, with a border printed around the 4 input pages on each output page.
Other options to pdfnup include --pages, --paper, --orient, --trim, --delta, --offset, --scale and --openright.
For pdfjoin,
pdfjoin file1.pdf file2.pdf file3.pdf --fitpaper true
produces a new file file3-joined.pdf in the current directory, with all pages included at their original sizes.
pdfjoin file1.pdf file2.pdf file3.pdf --fitpaper false --paper a4paper --outfile ~/docs/mybigfile.pdf
scales all of the pages to fit on A4-size paper, and makes the resultant file as ~/docs/mybigfile.pdf .
One possible use for pdfjoin, then, is to change the paper size of a PDF file, for example
pdfjoin USletterfile.pdf --paper a4paper --fitpaper false --outfile USletterfile-A4size.pdf
Other options to pdfjoin include --trim and --offset. The output filename and location are determined by the last input file if --outfile is not specified.
For pdf90,
pdf90 file1.pdf --outfile stuff/myrotatedfile.pdf
rotates all pages and puts the result in myrotatedfile.pdf in subdirectory stuff of the current directory, while
pdf90 file1.pdf file2.pdf
makes new files file1-rotated.pdf and file2-rotated.pdf in the current directory. pdf90 retains original page sizes in the output file.
Mac OS X only: drag-and-drop
Under Mac OS X, DropScript can be used to make simple drag-and-drop applications from these scripts. Some sample droplets are provided in pdfdroplets_1.20.tgz: these may be all you'll need! The sample droplets look like this:
These droplets assume that your pdflatex is at /usr/local/teTeX/bin/powerpc-apple-darwin-current/pdflatex. If pdflatex lives somewhere else on your system, the droplets won't work until you include in your home directory a file named .pdfnup.conf (or there is a system-wide file pdfnup.conf at one of the four locations listed above), containing the line
pdflatex=/path/to/pdflatex
where /path/to/pdflatex is the answer you get when you type which pdflatex in the Terminal.
Create and Print to a virtual PDF printer using cups-pdf
I have been looking for a solution to print any file to pdf using a pdf printer driver.
cups-pdf is the package I was looking for apparently.
Here is its set up of a few steps.
Install cups-pdf by using:
$sudo apt-get install cups-pdf
Edit /etc/cups/cupsd.conf and change the line that says:
RunAsUser Yes
to
RunAsUser No
Restart cupsys:
$sudo /etc/init.d/cupsys restart
Add a new printer (System->Administration->Printing) selecting the “Local Printer” “PDF Printer” option. In the next step choose “Generic Printer” and then used the “Postscript Color Printer (Ver 3)” driver.
Rename the printer
If you want a name better than "postscript-color-printer"
sudo pico /etc/cups/printers.conf
Change
to
sudo /etc/init.d/cupsys restart
Now you should be able to print to pdf by selecting the newly setup printer.
Cribs:
1) The output .pdf files are stored in your “Home” directory. I can’t find a way to change this output directory to something of my liking
2) The output files are named with pre-defined names (job_8-untitled_document.pdf is an example). It would have been nice to select a name while printing.