Creating a PDF File


Table of Contents:


Introduction

SourceForge Logo

This tutorial was created for the Microsoft Windows user who has always wanted to create PDF files.

This guide shows how you can use your Open Source Software (OSS) together with your Word-processor or any other MSWindows application to generate PDF files. Of course, you can always buy Adobe's Acrobat program, or Adobe PageMaker which have the program "Acrobat Distiller" to create the PDFs for you.

There may be shorter instructions for creating PDFs, but I hope that if you follow this process that creating PDFs will be as convenient to you as your regular document creation work.

A quick diversion, what and why PDF

What. PDF stands for Portable Document Format and was developed by Adobe to allow authors to create documents on any computer system and expect that it can be readable on other systems. To promote this file format, Adobe released a FREE tool for reading PDF files (Acrobat Reader.) Acrobat Reader became so popular on the Internet that it has become a standard for sharing documents.

Why. PDF is a very good format for maintaining accurate representation of what you want a document to look like, whether on your machine, on another machine, or even onto a printer. Compare PDF to normal web pages, HTML, and you will notice that depending on the machine and the printer, your HTML document will look and print differently. PDF does not have this problem.

Why. Printing companies around the world will let you create your magazines, newsletters, newspapers in what ever tools you use, and will take from you a PDF of your document and send this directly to their printers. In the publishing world, many printers expect the electronic copies from newspaper people to be submitted as PDF files. The PDF file lets printers duplicate the intentions of the author in the colors used, the fonts, and the layout.

Why. PDF's Layout control and portability are two main reasons why Postscript and PDF formats are extensively used on the Internet. Look up any technical papers on the Internet and more than not, they are published as PDFs. Look up most marketing 'brochures' on the Internet and it will most likely be a PDF. It looks the way they want it to on the screen, and it prints exactly as they want it to print. Technical writers use tools most of us have never heard of, such as LaTeX, but we read them as PDFs.

Why. Benefits of PDFs include archiving. As noted above, they retain the look of the document as it was intended. This can be used for storing text documents, and images. With special tools PDFs now also store Music and Video.

How do i create a PDF file

If you do not want to pay for creating PDF files, here is a process for creating PDF files.

  1. Create a Postscript File
  2. Convert this Postscript File to a PDF

Microsoft Windows supplies you with the tools for creating Postscript files, you do not need to buy any further tools.

Converting Postscript Files to PDF can be done using Open Source Software tools, which we describe below. You can download all these tools from the Internet, you do not need to buy any further tools.

This guide will show you how to create a postscript file in Microsoft Windows, and then two tools for converting these postscript files to PDF files.

Creating a Postscript File

The first major step in creating portable documents, PDF files, is to create a Postscript file. For Microsoft Windows, the easiest way is to print your documents using a Postscript Printer, but instead of sending your document to a printer, we send it to a file.

The print process converts the document from whatever your using (Microsoft Word, Excel or other) into a Postscript File.

Let's install a Postscript Printer Driver so we can get on.

Install a Postscript Printer Driver

To install a Postscript Printer Driver we need to Add the Printer. The procedure is.

  1. Start -> Settings -> Printers. or
    Start -> Control Panel -> Printers and Faxes

  2. Double-click on the "Add Printer" icon.
  3. Follow the wizard and make the following selections

If you want to use a different "Postscript Printer", go ahead, but to simplify these instructions we are going to choose the "Apple Color Laserwriter 12/600" as our Postscript Printer.

Port File:

If your version of Windows does not support the 'Port' "FILE" then install the printer to use any printer port.

You can select during the Print process to use "Print to File"

Remember that we want to have a "Postscript File" so we do not intend to print to a printer (whether you have one or not.)

Configure the Postscript Printing

Because Microsoft Windows programs generally use different fonts from Postscript Printers we want to make a few modifications to the standard behaviour of the Postscript Printer Driver.

Techno Note:
Microsoft Windows primarily uses TrueType fonts while Adobe Postscript primarily uses Adobe Type 1 and Type 2 fonts. We have experienced problems in this process, but the Postscript Printer drivers can generate the correct Postscript code to solve this problem.

To configure the Postscript Printer Driver for managing the font problem mentioned above, we go back to the Printers folder. First we get to the configuration options by:

  1. Single Click on the "Apple Color LaserWriter 12/600" icon
  2. Select File -> Properties from the menus

or you can

  1. Right Mouse click on the "Apple Color LaserWriter 12/600" icon
  2. Select Properties from the quick-menus.

The Properties Dialog.

The Properties Dialog Box gives us many options to change for how you can set the Postscript Printer to behave. The important thing for us is related to the fonts, as mentioned above.

Dialog: Printer Properties

The key settings can be made in the "Advanced" settings.

With the Properties dialog open.

  1. Select the "Advanced" tab
  2. Select the "Printing Defaults" button, which brings up another dialog box.
  3. Select the "Advanced ..." button from that dialog box

You should now see a dialog box similar or the same as that below.

Dialog: Advanced Properties Settings for Apple Color Laserwriter 12/600

The things we have to do are highlighted in the diagram above.

  1. Change the TrueType Font setting to specify "Download as Softfont"
  2. Change the TrueType Font Download Option from "Automatic"
  3. so that it now specifies "Outline"

Once you have done that, then you can 'click' on 'OK' for all the dialog boxes until they are all closed.

Print to the Postscript Printer

Now when we print from our application (e.g. Internet Explorer) you can specify the "Apple Color Laserwriter 12/600" in the print dialog. If you did not specify the port "FILE:" you can check the "Print to file" box.

Dialog: Print

Do this now and you will get a dialog box to ask for the name you want to give the file.

Dialog: Print to File

You can type in the name you want to use. Generally, it is a good convention to use the same filename as the document you are printing.

Your Postscript File has now been created.

Tools to Convert Postscript Files to PDF

The primary tools that we will use to convert our postscript files to PDF are Ghostscript and makepdf. Both of these tools are Open Source software that you can use by merely downloading the file or getting it from a friend.

To make things better, makepdf simplifies PDF creation significantly.

  1. Ghostscript - the core tool that does the work
  2. makepdf - the interface tool to simplify things for you

Ghostscript

[ref: http://www.cs.wisc.edu/~ghost/]

Ghostscript can read a PostScript or PDF file and display the results on the screen or convert them into a form you can print on a non-PostScript printer. Especially together with several popular previewers, with Ghostscript you can view or print an entire document or even isolated pages, even if your computer doesn't have Display PostScript and your printer doesn't handle PostScript itself.

Download the file from the above Internet reference and install it.

To keep things simple, please accept the default recommendations by the installation program.

makepdf

[ref: http://www.nomoa.com]

Two versions of the tool are generally available, the source distribution and the installable Windows executable.

  1. makepdf-0.03.tar.gz ([approx. 222kb] source install)
  2. makepdf-0.03.exe ([approx. 1,699kb] Full binary installation)

Download the Full binary installation and install it accepting the default recommendations.

Creating the PDF

Start MakePDF

To start MakePDF, double-click on the program or create a shortcut so you can use it from your menus.

The program can be found using Windows Explorer and looking at the directory C:\Program Files\makepdf.

Another way of starting makepdf is to use Start -> Run ... and when the dialog shows up, to type in the location of the directory as shown in the below diagram.

This will launch the Program and you will see the application screen.

MakePDF - Autoconfiguration

The 1st thing you will have to do after starting MakePDF is to select the File -> AutoConfiguration menu.

This is required so Make PDF can find where on your system the Ghostscript files are stored.

After you have executed this, your system is ready for creating PDFs.

Drag and Drop

MakePDF uses the "Drag and Drop" method for creating PDFs. To create your PDF file, drag the postscript file(s) you want converted onto the "Make PDF."

MakePDF recognises the 'dropped' files as the files you want converted, and within seconds your PDF is created beside the original postscript file.

You can drag one or multiple files onto the "Make PDF" screen and it will convert them all.

Windows Command Prompt

makepdf also works as a command-line utility.

You can create PDFs at the command-line by using the command:

   makepdf.exe postscript-file1 postscript-file2 ... postscript-fileN

makepdf will process all the files on the command-line before quiting.

[documentation incomplete]

Example Work

If you haven't already created a postscript file to test makepdf, take a look into the Ghostscript directory (here shown in c:\gs\gs7.05\examples.) where you will find a number of postscript files good for testing your makepdf installation.

  1. Ghostscript Examples directory
  2. Encapsulated Postscript File
  3. Postscript File

Just drag any of the postscript files (files ending with 'ps' Postscript, or 'eps' Encapsulated Postscript) onto the makepdf screen.

Related Reference

For those in Tonga, you can grab the above mentioned files faster by getting it locally at http://www.qsc.to/~samt/

Please do not use the Tonga site if you are from outside the country. The server hasn't got a problem with huge access, because the International line will clog up well before then.

To Do List

aka wishlist

Distiller Simulants

issues/bugs

Author and Copyright

Copyright (c) 2002 Samiuela LV Taufa. All Rights Reserved.

I reserve the right to be totally incorrect even at the best advice of betters. In other words, I'm probably wrong in enough places for you to call me an idiot, but don't 'cause you'll hurt my sensibilities, just tell me where I went wrong and I'll try again.

You are permitted and encouraged to use this guide for fun or for profit as you see fit. If you republish this work in what-ever form, it would be nice (though not enforceable) to be credited.

makepdf - Generating PDF files from Postscript Files

Copyright  © 2002 NoMoa Publishers All rights reserved. Caveat Emptor