Creating A Free Pdfwriter Using Ghostscript: Download Required Packages
Creating A Free Pdfwriter Using Ghostscript: Download Required Packages
Seite 1 von 19
I'd appreciate any feedback and comments on this page and these instructions. Send feedback to .
Install Ghostscript.
Synopsis: We install Ghostscript to the folder C:\gs. We note the version number. Double click on gs814w32.exe:
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 2 von 19
Note the version number the Ghostscript we are installing in this case it is 8.14 (you may need this later). Select the where you want to install the program under the Install to Directory. If you are not sure what to place here, leave the default C:\gs. All directions below presume Ghostscript was installed in C:\gs. You need to adjust all instructions for the actual installation path you choose. Make sure Install Fonts is checked. Click on Install to proceed. If no error messages appear, Ghostscript is now installed. The setup file gs814w32.exe can now be deleted (though you may want to wait until you know the entire setup is working).
Install GSview.
Synopsis: We install the optional package GSview using the default setup options. We now install GSview, a GUI front end for Ghostscript. GSview useful for previewing Postscript (and EPS and PDF) files using Ghostscript. Double click on gsv46w32.exe:
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 3 von 19
Proceed by clicking repeatedly on Next leaving the default options as they are until you reach the last screen:
Click on Finish and then on Exit. GSview will now be installed. You can find it under the Start Menu folder Ghostgum. You can now delete the file gsv46w32.exe.
Install RedMon.
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 4 von 19
Synopsis: We extract RedMon into the C:\gs\redmon folder and install it. RedMon is the utility that will enable you to convert Ghostscript into a virtual printer that creates the PDF files. We need to extract the redmon17.zip archive into the C:\gs\redmon folder and install RedMon. The following instruction will work on Windows XP, but not earlier versions of Windows since those do not have build-in ZIP archive extraction. If you need a utility to extract ZIP files I recommend IZArc (freeware). Extract the ZIP archive to C:\gs\redmon and go here to continue. Right-click on the redmon17.zip file and select Extract All...:
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 5 von 19
Enter C:\gs\redmon under Files will be extracted to this directory:.Click on Next to proceed.
Make sure the Show extracted files is checked and click on Finish. The following folder should appear. Note: The folder may look different depending on how Windows XP is configured to display folders.
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 6 von 19
Double-click on setup.exe:
and then on OK to finish. If all goes well RedMon will be installed on your computer. You can now delete the file redmon17.zip. Do not delete the C:\gs\redmon folder!
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 7 von 19
Alternatively download the above pdfwrite.txt file from here. Note that the path (the first line) must be correct for the version of Ghostscript you installed. Change the 8.14 to whatever version number you noted when you installed Ghostscript. European users should change the paper size from letter to a4. The PDF compatibility level 1.4 will create PDF files that can be displayed with Acrobat Reader 5 or later. Use compatibility level 1.2 to create file Acrobat Reader 3 or later can display. This file is read every time a PDF file is created and it can be changed at any time to suit your needs. Note: If your path names contains spaces you will need to put quotes around the paths specification C:\gs\gs8.14\lib;C:\gs\fonts. Thanks to Jonathan Sefton for pointing this out. The PDFSETTINGS=/prepress option creates high quality PDF files at the expense of space (this is often visible in images). Other options are /printer, /ebook and /screen which will create smaller PDF files at the expense (mainly) of image quality. For more information on what options are available see here: http://www.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm. Note: A good option to add may be to add auto-page-orientation. Add: -dAutoRotatePages=/PageByPage (or /All) to enable it. This will auto-rotate the pages to landscape when necessary. See the Ps2pdf link above for more information. Thanks to John Harald Apeland for suggesting this. Save the options file File > Save as pdfwrite.txt into the C:\gs folder:
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 8 von 19
For Windows 98 click here to continue. Create the Virtual PDF Printer (Win 2000/XP).
Synopsis: We create a redirected port RPT1: and associate a color PostScript printer to this new port. We now create the virtual PDF printer. We need to run the Add a printer Wizard found in the Windows Printers control panel:
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 9 von 19
Click on Next:
and make sure the Local printer attached to this computer option is checked and all other items are unchecked. Click on Next:
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 10 von 19
and select Create a new port and choose Redirected Port as the Type of Port. Do not choose the FILE: or any other port here! If you are using Windowx XP/2000 and you do not have a Redirected Port as an option then the installation of RedMon (above) failed. Note: Windows 95/98 will not list a redirected port here. You cannot continue until RedMon is properly installed. The Windows 2000 screen looks significantly different then the XP screen shown above. The functionality remains the same. Click on Next and
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 11 von 19
accept the default Port Name of RPT1: by clicking OK. Select the default printer to associate with this port.
Select the HP printer HP Color Laserjet 4550 PS. Even if you do not own this printer select this choice. Certain other (but not all) printer selection will work here. Important is that printer be a color PostScript printer. Some printers seem to give better font quality output then others. I have had good success with this one. Under Windows 2000 select the HP C LaserJet 4500-PS printer. Click on Next until you must name your
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 12 von 19
printer:
Name the printer GS PDFWriter and you probably do not want it to be your default printer. Click on Next and Next again on the Printer Sharing page until you reach the Print Test Page dialog box:
Make sure you do not print a test page. Click on Next and then Finish to actually install the printer.
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 13 von 19
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 14 von 19
and select Print directly to the printer (this prevents spooling the PDF output to the disk twice). Now select the Device Settings tab:
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 15 von 19
and set Send CTRL-D After Each Job to No. Also change the Wait Timeout to 1 seconds:
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 16 von 19
These two Device Settings modifications avoid the ERROR: undefined OFFENDING COMMAND:_ STACK: error message that some user report on the last page of the PDF output. Thanks to David Taft and Brent Powers for suggesting this solution.
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 17 von 19
and fill out the dialog box as shown above. Make sure the program path C:\gs\gs8.14 \bin\gswin32c.exe points to the gswin32c.exe executable. Change version 8.14 in the path to match the version that was actually installed. Make sure the Arguments for this program are: as indicated above (listed here again for reference and easy cut-and-
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 18 von 19
paste): @C:\gs\pdfwrite.txt -sOutputFile="%1" -c .setpdfwrite -f Note the dash at the end of the line and the period at the beginning of ".setpdfwrite". The path name after the "@" points to the options file pdfwrite.txt we created above. The Output: needs to be Prompt for filename, the Printer: is irrelevant and the Run: box should say Hidden. Click on OK when done. Note: It may be necessary to check the Run as User box if the user's credentials are necessary to access required resources. For example, writing the PDF file to a network drive may require the users permissions. Thanks to Bryan Wilson for pointing this out. Note: If your path names contains spaces you will need to put quotes around the path C:\gs\pdfwrite.txt. Thanks Jonathan Sefton for pointing this out. Note: You can modify the port argument to "-sOutputFile="%1.pdf". This will, by default, add the .pdf extension to the output filename. Thanks to Justin S. Cohen for pointing this out.
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006
Seite 19 von 19
and, hopefully, a dialog box prompting you for the file name of the PDF file should open. Enter a file name with the .pdf file extension (the program does not automatically add it), select a location and print (i.e. create) the PDF file. View the newly create PDF file (in this case test.pdf) with a PDF viewer. Note: If the color on the PDF output file is wrong (i.e. the black is not black), remove all the Color Profiles in the Color Management tab of the GS PDFWriter printer. If everything work correctly your PDFWriter is now functional. You can create a PDF file by selecting the GS PDFWriter printer from any applications that can print a file. Please let me know if you succesully used these instructions to create a Ghostscript based PDFWriter. Email me at .
http://www.stat.tamu.edu/~henrik/GSWriter/GSWriter.html
30.11.2006