Creating PDF and PostScript Files

Few comments from my experience; feedback welcome – Amir Herzberg (my homepage).

Notice: this document is rarely updated, as I have pretty much stabilized on solutions that work well for me.



Solutions that work well for me

Converting PostScript documents to PDF

Creating PostScript/PDF using TeX, LaTeX etc. (or: converting DVI to PDF/PS)

Creating PDF using Windows Office Applications.

Creating PostScript using Windows Office Applications

A bit off-topic: Creating portable technical/scientific documents: WYSIWYG or Markup (aka: Word or TeX)?


In many cases, you may need to create documents which are portable, and can be viewed and printed by people using different computers, operating systems and printers. For simple text, such as this file, HTML is usually the simplest and best option. When print quality, precision and versatility are critical, e.g. to support formulas, HTML is insufficient. Instead, use one of the Portable (device-independent) Document Formats. The two most common are PDF and postscript, both defined by Adobe. Viewing and printing postscript and PDF files is easy on almost all platforms; the most common (and free) tools are Ghostview (for both) and the Acrobat reader (only for PDF).

Postscript was not designed originally (and certainly not exclusively) for document sharing; its original and main goal is to describe a page to the (laser) printer. This is why Adobe introduced PDF, and in some cases, PDF is indeed better for document sharing. A major problem is that postscript files can sometimes be very large – even after compression – compared to the pdf version of the same document. Another problem with postscript files, is that they may specify fonts in two ways: `Type 3`, resolution-dependent, bitmapped fonts, or `Type 1`, scalable, outline fonts (is there Type 2? you tell me…). For portability, the `Type 1` (scalable, outline) fonts are clearly preferable, but they result in larger files. Authors sometimes fail to notice this detail, leading to documents which appear well when they inspect them – but are not portable (may not appear well when viewed/printed in different systems). Postscript files, especially containing `Type 1` fonts, contain much redundancy, and their size reduces substantially after compression.

The best solution is probably to produce PDF rather than postscript; definitely that’s what Adobe would prefer, as they sell software to create it (called Acrobat, and not so cheap, see below). Postscript is easier to produce, by simply `printing` to a postscript printer but sending the output to a file (most software allows this); details below. Enclosed are some tips on creating both PDF and postscript files, in the two most popular environments: using the typesetting family of TeX, LaTeX etc.; and using `standard` office applications in Windows. You can also visit the How to create a Postscript or PDF File of ILLC, which is excellent, and also covers the Macintosh environment (which I don’t use). I was also told Sun’s StarOffice has built-in support for producing PDF files, but haven’t tried that yet (I know, I should…). Another good guide to PDF creation is in  

Solutions that work well for me (or: why this document is not up to date…)

Before proceeding, a caution: I wrote this document few years ago, when I encountered this problem. I since settled on a set of tools which do the job very well for me, and since then, I'm not looking much – I'll change only if I find a new need or if I hear of some better tool… So here is a short list of what I found as a good set of tools:

  1. I create most of my scientific papers using LaTeX. LaTeX can  create PS and PDF.
  2. If I need PS or PDF versions of an `office document`, I usually use Open Office, which has a great built-in generator. For example, I often use this to embed a diagram into a LaTeX paper.
  3. When I need PS or PDF from another application (e.g. in the rare case that Open Office does not open correctly a MS Word document I receive), then I use the free (adware) pdf995 utility.
Converting PostScript documents to PDF

As postscript files are easier to generate (see hints below), and PDF files are more compact and portable, you may want to convert a postscript file to PDF. One popular method to do this is by using the Ghostview shareware; essentially you use the Convert command in the File menu. In fact, this process is so popular, that several people documented it; see instructions by Gene Van Dyke, by Ken Chiro and by the ZipGuy, who even made a utility called FreePDF to automated the process.

You can also convert postscript files to PDF using the shareware ps2pdf utility, or using the web service (but when I tried it once, it produced corrupted PDF file). Neevia also offers a free conversion service.  Neevia also produces a utility that converts among document formats, and in particular converts postscript to PDF. These products cost 99$-349$. Another such utility is Acrobat Distiller, shipped with Acrobat (but Kate Fiedler says Distiller can also be obtained separately).

Creating PostScript/PDF using TeX, LaTeX etc.

For creating high-quality technical and scientific documents, the TeX family of typesetting programs (e.g. LaTeX) is a highly recommended and popular tool (see some comments below on ‘Creating portable technical/scientific documents: Word or TeX’) . I usually use the open-source TeXnicCenter environment to create and work on LeTeX documents, with MiKTeX, a popular freeware implementation of TeX & LaTeX; this produces great PDF (and PS) output (thanks to Gil Neiger for reminding me to mention this).

All TeX implementations can output another portable format, called DVI (for `device independent`). DVI readers are not as common, and it is possible to convert DVI files to postscript or PDF, using the (free and widely available) dvips or dvipdf utilities, respectively. Yuval Turgeman recommends creating PDF from DVI using dvipdfm, freeware developed by Mark Wicks, which he says produces good PDF (cf. to dvipdf).

When using the dvips utility, you may want to use the '-Ppdf' or '-Pwww' flag, as in

dvips -Ppdf myfile.dvi

This will tell dvips to use `Type 1` (scalable, outline) fonts; the default is `Type 3`, resolution-dependent, bitmapped fonts.

Notice that some (older) versions of the ps2pdf and dvipdf programs may produce `Type 3` fonts in the PDF file. You can check whether your document contains Type 3 fonts by opening your PDF file in Acrobat Reader, and selecting `Document Info - Fonts' from the menu; don’t distribute them. Upgrade to more recent utilities (actually, the culprit is the Ghostview program used by the utilities – you need version 6.0 or higher).

More information on creating good postscript and PDF files from Latex documents can be found here:

Creating PDF using Windows Office Applications.

Users of office applications can easily create good PDF files using the Acrobat program from Adobe, whose list price is currently 249$ (do not confuse it with the Acrobat Reader freeware!). Your organization may have a site license, of course. You can also try Adobe's Online Conversion Service, which offers five free trials, but I haven’t. A competitor, Neevia, offers a free unlimited online conversion service; it worked well for me on several Word and PowerPoint files (thanks to Yuval Turgeman). 

Neevia also produces a product that converts among document formats, and in particular converts many formats to PDF, namely competes with Acrobat. This product has many features, some apparently beyond Acrobat; I haven’t tried it. It comes in two versions, professional (349$) and personal (99$).

A much cheaper alternative is pdf995. It is also a downloadable converter, but it is adware, i.e. free of charge (but shows you an ad each time you use it), or you can pay 10$ to use it without ads. I used to have some problems with it in the distant past, including subscript text sometimes disappearing and large output (pdf) file; but a new version I’ve downloaded at 2004 or so, produces excellent (and compact) pdf files; this is now my favorite method of creating PDF files (if I can't use a built-in generator as in Open Office or LaTeX).

Jean-Baptiste Rouquier wrote to me that he prefers pdfcreator, which installs a virtual printer, much like Adobe distiller, but is open source and thus free.
Sounds good, but I haven't tried (and doubt if I will since I'm very happy with the tools I use now).  Please let me know if you find better free/inexpensive tool.

Another option is to generate postscript files, as I describe below, and then convert to PDF as described above.

Creating Portable PostScript using Windows Office Applications

Many people want to produce portable postscript files from their Windows applications; I actually think PDF files are usually better (and in particular more compact) but here are some details on creating portable postscript from Windows. One motivation for creating postscript is simply to transform the postscript file into PDF file, as explained above, although I think it is better and easier to create the PDF file directly from the windows applications, as explained above. Still, creating postscript and then turning them into PDF files is very popular; see instructions by Gene Van Dyke, by Ken Chiro and by the ZipGuy, who even made a utility called FreePDF to automated the process.

In principle, it is easy to create a postscript file from Windows applications: simply print from the application, selecting a postscript printer and using the printing option `print to file`. Instead of actually printing (sending the postscript file to the printer), the printer driver will save the postscript file in the location you select. You may need to change the file extension (from .prn to .ps), though.

However, the resulting postscript file may not be completely portable – after all it was created for your printer. And you may not have a postscript printer at all… The solution is to install a virtual postscript printer, i.e. install printer drivers without actually having the corresponding printer – after all you just print to file anyway. I think the best printer for this (in terms of portability) is the MS Publisher Imagesetter, which is available in (some? most? all?) Windows installations; my instructions are for Win2000, but it should be fairly similar in most Window versions.

To install the MS Publisher Imagesetter virtual printer, open the `Printers` settings folder, and click `Add Printer`. Select a local printer; since it is virtual, select the FILE: port. Specify `Generic` as manufacturer, and then you can choose the MS Publisher Imagesetter.

After you install the printer, you may want to fine-tune its properties. To do so, open again the Printers setting folder, and right click on the printer; select `Properties`. Under `Device Settings`, set very low values (e.g. 5) to the following two parameters:

Minimum font size to download as outline

Maximum font size to download as bitmap

Next, go to the `Advanced` tab, and from there, select `Printing Defaults…`. In the window that opens, select `Document options`, then `Postscript options`. Set the following two options:

PostScript Output Option: Optimize for Portability

TrueType Font Download Option: Outline

Creating portable technical/scientific documents: WYSIWYG or Markup (aka: Word or TeX)?

A short digression: what is better, to write using `Office`, WYSIWYG tools (e.g. Microsoft Word, OpenOffice,  Sun’s StarOffice, or otherwise), or using markup typesetting systems like TeX and LaTeX?

I wish I knew. The choice used to be trivial as it used to be impossible to write math with Word, but that changed; MS Word now includes a fairly reasonable equation editor. New versions of Word try/claim to provide substantial flexibility and in particular support the concept of `style`, i.e. you can mark text as belonging to a particular `style` (e.g. header), and then change the appearance of the style as needed. This used to be a critical differentiator of the `script-based` typesetting systems like TeX. And using office applications is certainly convenient – you can use many tools (e.g very good spellers), integrate elements from other applications (e.g. edit your figures from the document), share information between the documents and presentations (with good presentation tools such as PowerPoint) and collaborate on a document with others. The last point, of course, is community-dependant, i.e. if your peers prefer to use Word (LaTeX), then to collaborate you need to use Word (respectively LaTeX), etc.

My two cents on this: much of Microsoft Word promises are (still) not well fulfilled. Some problems I encountered with Word are with its limited and problematic support for numbered items (Theorems, definitions, figures,…), and similarly with styles. Also, while equations support has much improved, it is not completely integrated with Word; e.g. multiple-line equations are not well supported, cut’n’paste does not work between regular word text and the equation editor, etc.. I therefore conclude that for either a sizeable text, or when there are many equations, TeX/LaTeX is probably (still?) better. BTW, I use TeXnicCenter, a very convenient integrated environment for editing and compiling TeX and LaTeX documents.