NWA-PCUG Newsletter Article, July 2002
Make Your Own PDF Files
by Paul Witheridge
ssuccess@ebtech.net
(click to email author)


I'm currently Shareware Librarian of the Sarnia Computer Users' Group and a Past President. I'm in my 14th year with SCUG and am a semi-retired computer consultant.

One of today's biggest computing irritations is competing standards! While there are standards out there for such things as e-mail, file transfer and Internet protocols, and HTML coding for web display, someone is always "pushing the envelope" (to be polite) or "ignoring them" (to be blunt). Document sharing is an example. Many think that Microsoft Word is the standard for documents but it is only one in a field of word processors. At one time, they simply pretended each other didn't exist and if you created a document using one word processor, you couldn't share it with others who were using a competitive product. Now, at least the major brands provide the ability to convert between formats but often at the expense of some of your painstaking efforts to create that Beautiful Format. Enter Adobe and the Portable Document Format (PDF). If you can create (or "export to") a PDF file with your word processor, you can produce a "stand-alone" document that anyone can see or print exactly as it was created -- fonts, pictures, whatever -- but without the program that created it! Catch? Of course there's a catch! First of all, you need the Acrobat Adobe Reader to see/print these. Yes, it's free; but it is a few megabytes in size and usually has to be downloaded and installed. But how to create the PDF in the first place? Are we still somewhat at the mercy of the Adobes, Microsofts and Corels? Read on!

There are two freeware (free for non-commercial, home use) programs that can enable you to create (and read) standard PDF files (as well as postscript files):

MakePDF, (http://www.lexacorp.com.pg/soft/makepdf22.zip) a freeware utility for converting the postscript translations from GhostScript to a Portable Document Format file and GhostScript, (ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs703/gs703w32.exe ) a free postscript interpreter which translates postscript documents.

NOTE: If the version numbers change, the above links will become outdated.

If you visit the Lexacorp site first, there is a link there to GhostScript as well as to MakePDF. Stuart also offers several other MAKEPDF tips and tricks at http://www.lexacorp.com.pg. After downloading both of these, install GhostScript by double-clicking the GS703W32.EXE file. Then simply unzip MAKEPDF21.ZIP into the folder of your choice (no installation needed). I must assume that the reader can do this using their favourite compressed file unpacker.

Then, you need to define a printer that can produce postscript output such as the HP Laserjet III PostScript+ in your selection of printers. You do not need to have this printer connected, you merely need to add/install it as if it were installed and configure it to send output to a .PRN file. Here's how.

In Windows, click Start|Settings|Printers and then double-click 'Add Printer'. Choose 'Local Printer' and click 'Next'. Now select the printer you'd like, making sure that it can produce postscript. The HP Laserjet III PostScript+ is an obvious choice but other manufacturers are available on the list you'll see. After selecting one, you'll be asked where to output your data and this is where you will choose 'FILE:' and then click 'Next'. Most likely you will not want this to be your default printer, but this option is always available later if your needs should change. Click 'Next' and then 'Finish' and you will most likely be prompted to insert your Windows installation CD in order to retrieve the necessary driver files. After the printer driver files have been copied, you will be prompted for a PRN filename (in case you wanted to print a test page). You can click 'Cancel' to skip this step. Did you know that you could also rename this printer installation to something more helpful like PostScript Creation? Right click it and rename!

Once the process is complete to this point, you will have an additional printer option whenever you wish to "print" a document from any application you are using. When choosing this new option you have just installed, you will be asked for a filename and destination folder since the output will not be a "hard copy" on paper, but a .PRN file on your computer.

We now need to create a way to easily send these PRN files created by your newly installed postscript-capable (phantom) printer driver to MAKEPDF which will use GhostScript to finally create the PDF file.

One way to provide this "connection" is to add a shortcut in your SendTo links that will appear when you right-click a file in Windows Explorer (or other file manager) and select 'Send To'. Open your \Windows\SendTo folder and right-click a blank spot. Click New|Shortcut and insert a command line similar to the following, but insert the proper path for your installation of MAKEPDF in place of the square bracketed portion.

[C:\Utils]\MAKEPDF.EXE

Click 'Next' and then name it MakePDF or whatever you like. Click 'Finish' and you're done.

Now you can right-click any PRN file created by your phantom printer and then choose SendTo|MakePDF to create your PDF file.

You could also create a shortcut on your desktop in the same way and just drag and drop PRN files onto the icon.

There are a few other clever tricks the more advanced user can perform either by defining a new filetype (see end of this article) or using macros in your word processor or creating a custom printer port or having your PDF sent directly to your e-mail client but you can read about those in Stuart McLachlan's (author of MAKEPDF) Readme text file that comes with MAKEPDF. Most of us will be quite happy with a shortcut in the SendTo folder!

Using MAKEPDF
The first time you send a PRN file to MakePDF, you will be asked if you want to locate the GhostScript program. Click 'Yes' and browse your way to the GSWIN32.EXE file which, if you used the default location will be in the C:\GS\GS7.03\BIN folder. [Note that there are two similarly named executable files at this location. The one with the 'C' is for command- line operation.] Single-click the GSWIN32.EXE file and click 'Open' and this path will be saved in a MAKEPDF.INI file for future reference and you won't have to repeat this step.

MakePDF will now open and you will see the path and filename of your (input) PRN file and the same path but different file extension for the output PDF file. Unless you want the PDF file to be put somewhere else or have a different name, you can accept the default offering.

There are options offered, most of which I usually ignore; but here is a brief explanation of them as I understand them: Delete Input File - deletes the PRN file after it has been translated to save collecting large numbers of these intermediate files. Lower Case Output - produces a PDF filename with all lower case letters for feeding to other applications which may require that. Sticky Output Directory - use this if you want the folder you set in 'Output Filename/Directory' ALWAYS to be the destination of your PDF files. View Output File - check this if you want Acrobat Reader to open your new PDF as soon as it's created. Auto-Exit on success -- check this to save having to click the 'Quit' button No Messages -- all message boxes are suppressed. I wouldn't recommend this for the beginner.

Choose the version of PDF file you wish to create and after a few seconds, you will see a confirmation dialogue box that the process has been successful. NOTE: In case your intended recipient has an older version of Acrobat Reader, it may be best to create an older version PDF. The resulting PDF file you have now created can be double-clicked to be opened in Acrobat Reader and it will appear exactly as you created it in your original application and anyone with Acrobat Reader can do the same. And print it! But the Reader does not allow editing, just reading and printing. This can be a very good thing when you don't want your document altered by others!

For The Advanced User
For the more adventurous, (once you are comfortable that you have everything working) you could even establish a new filetype (change PRN to something completely new that is not already registered on your computer) so that a simple double-click on files of that type will start MAKEPDF and open them. This involves first avoiding any of the extensions already listed in Start|Settings|Folder options|File Types and then in there creating a 'New Type' and specifying a command line similar to the following to open those files:

"[C:\Utils]\MAKEPDF.EXE" %1 /D /V1.2 /OC:\My Documents\PDFfile.PDF

again, inserting the proper path for your installation in place of the bracketed portion.

NOTE: If you have difficulty with Acrobat Reader opening PDFs with a double-click, I've found that a reinstall of Acrobat Reader usually solves this.

I'd appreciate a copy of any newsletter this article appears in. It's always nice to see what kinds of newsletters think it's worthy of space. A PDF copy would be appropriate, yes? I can pass them along to our editor too (for ideas).

There is no restriction against any non-profit group using the article as long as it is kept in context, with proper credit given to the author. This article is brought to you by the Editorial Committee of the Association of Personal Computer User Groups (APCUG), an International organization to which this user group belongs.

Click here to return to top



==================================================================