Quick Guide to Making PDF Files

By David R. Hineline

 

 


This page will describe briefly how to make PDF files using Ghostview, a free program available through the University of Wisconsin.  This is convenient, because many people believe you need Adobe's Acrobat program which is not cheap.

Why Use PDF Files?
PDF stands for "Portable Document File". The nice thing about PDF files is that anyone can view your document, regardless of the software you used to create it. For example, if you create a document using Microsoft Word 2000 then it may be difficult for others to view your document if they use an earlier version of Word or an entirely different program. For scientific documents and typesetting, TEX (or LaTex) is often used, yet many people do not have the appropriate programs to view the document, often a DVI file. 

PDF files allow a common format. PDF files are viewed using Adobe Reader which is a free program. You can create PDF files using Adobe Acrobat, which is not cheap. This page will explain how to create PDF files using a free program called Ghostscript.

Overview of Steps
You will need to install a Postscript printer on your computer, if you do not already have one. Note, you are not actually installing a real printer, but just the drivers for a printer. You will use this printer only to print to a file. The file will be a Postscript file, *.ps, or *.prn. Then you will use a Postscript viewer, Ghostview, to open the postscript file. Using Ghostview you can convert the PS file to a PDF file.

 

 I. Installing Necessary Software - Postscript Printer and Ghostscript/Ghostview

1. Installing a Postscript Printer
You will need to install a postscript printer on your computer if you do not already have one.  You will need two files for this step, both available from http://www.adobe.com/. The first is the Adobe Universal Postscript Windows Driver Installer. Go to the link and  select the appropriate language and operating system. For example, English language for Windows 95, 98, Me, NT 4.0, and 2000 is called winsteng.exe. Save this file to a temp file, say C:\temp. Since you do not actually have a physical printer on your computer, you will need the driver for a printer. You can get a list of drivers also from the Adobe site. You can download PPD files from the same link as above. I can testify that HP (Hewlett-Packard) files work well. In fact, you will have to pick a printer to install and I can verify that an HP 5P/5MP works well. Save the PPD files (e.g., HP.exe) in the same temp file.

(a) So, you now should have downloaded two files: winsteng.exe and HP.exe (or others if you have a different operating system or didn't want HP drivers).

(b) Now run the HP.exe program to unzip the PPD drivers.

(c) Now run the winsteng.exe program. You will have to agree to the user agreement. Then select a local printer, rather than a network printer. Choose that it will be connected to local port LPT1. Now you have to select the PPD driver. You will need to browse for the drivers you just unzipped and select a printer. Do not install the printer as your Default, and do not print a test page. Finish the installation.

2. Installing Ghostscript and Ghostview 
Now you need to install Ghostscript and Ghostview. Ghostscript is an interpreter for the Postscript language and for PDF. All the necessary programs are at the Ghostscript, Ghostview and GSview Home Page. You will need to download and install the latest versions, which at this time are Ghostscript 7.04 and GSview 4.2.

 

 II. Create a PDF File and Set Configurations

Now we want to create a sample PDF file. This both show you the steps necessary and also allows you to set some initial configurations that are important. 

(a) Open up a document of your choice, say a Microsoft Word document test.doc. Select File\Print to print the document. (Don't press the Print Icon as this will print the document using the default printer). Select your Postscript printer and check the box "Print to File". Now choose the folder where you want to save the file and name it, e.g., C:\temp\test.prn. Now you can close Microsoft Word.

(b) Open the program GSview. Choose File\Open and browse to where you saved test.prn and select it. Now you should be viewing the document in GSview. Choose File\Convert and then select the device PDFWRITE and the desired resolution. Now click the button on the right that says PROPERTIES.

(c) I do not know what all of these properties do. I do know that some make a big difference, especially compression and embedding fonts. So here I will just tell you the setting I have chosen and mention the cases I know that are important.

CompatibilityLevel - 1.4

CompressPages - True

UseFlateCompression - True

EmbedAllFonts - True

Compressing can make a big difference. You may have a 4MB Postscript (*.ps or *.prn) file. When you convert it to PDF it may still be very big if you don't compress it. However, with compression it may only be 200KB, which is a huge difference if people are downloading your document or you are emailing it to someone.

Embedding the fonts allows someone to view and print the document correctly even if they do not have the same fonts installed on their computer. This is a big deal when it comes to math and equations. I have seen many cases where I open a paper and none of the math comes through because the person did not embed the fonts and I am on someone's computer that does not have the appropriate fonts.

The properties should stay the way you set them the first time, so you should not need to select them each time you create a PDF file.

(d) Once you have selected the properties, click OK to close the dialogue window. Now you are back to the CONVERT window.  Click OK. Now you choose where to save the file and the name, e.g., C:\temp\test.pdf. 

That's It!

   

To go to my homepage, click here.