Go to the Main Scientific 
Document Preparation Webpage

Making PDF Files in Windows

Last Updated: April 30, 2005

  1. System Preparation
  2. Making PDF Files: Basic
  3. Making PDF Files with Embedded Fonts: Advanced
  4. Simplifying the Process

System Preparation

You will need to install some programs to your Windows setup.

All of these files are downloadable free of charge. You may use them indefinitely, but each has a different license agreement, particularly regarding redistribution. GSView now asks you to ``register'' the program for a fee of US $40. However, this is purely optional, since the registration is not part of its license agreement. You may wish to do this if you use the program heavily and want to help the the programmers to develop their software.

Before you start, unzip the Adobe PPD files (adobe.zip) into a directory called ``C:\adobeps\adobe'' with an unzipping program (such as InfoZip's Wiz). Install the Adobe Type Manager, if desired.

The Adobe Postscript printer driver is installed differently than other Windows printers. You must run the setup program, rather than click the ``Add Printer'' button in the Windows printer control panel. When you install the Postscript printer driver, tell the setup wizard that it is a ``local printer.'' When the setup program asks you for a port, select FILE: instead of LPT1. When it asks you either to ``select printer model'' (universal Postscript driver) or to ``install from PPD'' (version 4.2.6), click the ``Browse'' button and navigate to ``C:\adobeps\adobe.'' Then you can choose the ``Acrobat Distiller'' module instead of the ``generic Postscript printer.'' Name the printer ``Create PostScript File.''

Run the Acrobat Reader, GhostScript, and GSview install programs (in that order).

Open GSView for the first time and finish it's configuration. Associate postscript files (*.ps) with GSview, but leave PDF files associated with Acrobat Reader. By default it is set to use A4 paper. If you live in the U.S. and/or use letter paper you will want to change this. Go to the Media menu and select ``Letter.'' If you do not do this, your PDF file will be made for A4 paper. This is no big deal except for the fact that the printer will ask for A4 paper when someone tries to print it (annoying).


Making PDF Files: Basic

Making PDF files is a 2 step process:

  1. Generate a PostScript file.
  2. Use the PostScript file to generate a PDF file.

The first concept you need to understand before you continue is that you do not save a file in PDF or postscript form. Instead, you print a PostScript file, open it, and then print or convert a PDF file. You will never use the Save commands from the File menu. You will only use the Print or Convert commands.

Making a PostScript File

If you are using a standard Windows program (like Word), select Print from the File menu. Choose the ``Make postscript file'' printer, and check the ``print to file'' box. You will then be presented with a file saving dialog. At the bottom, choose the file type ``All files (*.*)'' and print your postscript file with the .ps extension. Alternatively, you can specify a filename with the .ps extension directly, so long as you put it in quotes.

Making a PDF File from the PostScript File

Next, use the Windows explorer to open the PostScript file you just wrote with GS View. Go to the File menu and select Print (for older versions of GS View) or Convert (for newer versions of GS View). Do not select ``Print File'' from the File menu!!! It is there for a different purpose.

Make sure the ``Print to File'' box is checked. Select 600 DPI printing resolution, and choose the pdfwrite device. When you are presented with a file saving dialog, print the PDF file with the .pdf extension.


Making PDF Files with Embedded Fonts: Advanced

Acrobat reader contains internal support for only 5 font families:

  1. Times New Roman
  2. Courier
  3. Arial
  4. Symbol
  5. Zaph dingbats

All other fonts are stored in PDF files as Type 3 (bitmapped) fonts. Type 3 fonts print perfectly but look really crummy in Acrobat Reader. If you want other fonts in your PDF files, and you want them to look good in Acrobat Reader, you must embed Type 1 or TrueType fonts. This is not particularly hard.

You may see what kinds of fonts are encoded and/or embedded within a PDF file by opening it in Acrobat Reader, going to the File menu, selecting Document Properties, and finally selecting Fonts.

Embedding TrueType Fonts

It is now quite easy to embed TrueType fonts in PDF files, so long as you used the Adobe Postscript printer driver with the Adobe PPD files. Open GSView, go to the ``Options'' menu and select ``Advanced Configure...'' In the ``GhostScript Options'' box, make sure you have the following value:

-dNOPLATFONTS -sFONTPATH="c:\windows\fonts"

Note that for Windows 2000 and NT4, the fontpath should be changed to "c:\winnt\fonts." After that, any PDF file you make through GSView will embed TrueType fonts automatically.

Embedding Type 1 Fonts

First of all, you must install Type 1 font files for the fonts you want to include. To install the Type 1 fonts, use the Adobe Type Manager, and allow it to copy the fonts into your c:\psfonts directory. Once this is done, you may select and use the Type 1 fonts in your windows applications just like TrueType fonts.

Next, modify the ``GhostScript Options'' box of GSview to read:

-dNOPLATFONTS -sFONTPATH="c:\psfonts;c:\windows\fonts"

Once this is done, any Type 1 font that you use in your Windows application file will be embedded as a Type 1 font in your PDF file.

embedding Type 1 Fonts Instead of TrueType Fonts

You use TrueType fonts in your documents and opt to have Type 1 fonts in your PDF files. You must have a Type 1 font installed (through the Adobe Type Manager) for each TrueType font you wish to substitute. Open the properties dialog of the ``Make PostScript File'' printer you created earlier. Select the Fonts tab and edit the TrueType font table. You will see that nearly all are set to ``send as Type 42.'' This is the setting to embed TrueType fonts as TrueType fonts.

For each TrueType font that you wish to substitute a Type 1 font for, reset the value of the send as box from ``Type 42'' to the name of the equivalent Type 1 font. Look at the ones which are already remapped by default as examples.

You may notice that there is a pull down box for Postscript fonts with the option ``Don't Send.'' Leave it alone! It may seem odd, but this option is there for real printers, not the Postscript files we make.


Simplifying the Process

PDFCreator

There is an open-source project called PDFCreator that automates much of the above tasks. PDFCreator sets up a direct, PDF-Making, virtual printer in Windows (using GhostScript as a back-end), so you do not need to ``print'' a Postscript file, open it, and then ``print'' a PDF file. The main project code is GPL.

One of the things about this project that will appeal to many inexperienced computer users is that it aspires to have a very simple download and setup procedure. The master install program includes a copy of GhostScript and an appropriate PostScript driver. Supposedly, you could just download this one installer and Acrobat Reader and be ready to go.

I have used this on 4 computers so far and, overall, I am very pleased with it. My last install was on WindowsXP, and it went flawlessly. However, in order to get PDFCreator to work on Windows 98, I have always had to install GhostScript separately before installingPDFCreator. Even though PDFCreator installs its own copy of GhostScriptin a subdirectory, none of the installs I have done have been able touse it. This isn't a big deal (especially considering that this isstill beta software), just be aware of it.

Also, since PDFCreator is designed to be very turnkey and newbie-friendly, it doesn't have as much flexibility as the approach described above (for example, you lose the ability to choose font paths). However, I think that a great many users won't have need of this flexibility anyway. Of course, you can install PDFCreator and all the other software listed above on the same computer. They don't interfere with each other.

GhostWord

GhostWord is very nice addon for Microsoft Office. The home page lists it as compatible with Office 97 and Office 2000, but it seems to work in Office XP as well. Rather than the usual means of creating PDF files through the printer dialog boxes,GhostWord is a small program that is activated through a little toolbar button. It uses a postscript printer driver and GhostScript to automatically create a PDF file. It can also use Acrobat Distiller instead of GhostScript. This program has some additional benefits beyond automation of the process. It can parse the headings of a document to produce an index for the PDF file. It can also parse the document for hyperlinks (although GhostScript will ignore hyperlinks). This program is easier to set up than FreePDF, but works only for Word, Powerpoint, and Excel. GhostWord is freeware (but not open source).


Return to main page