VOICE Home Page: http://www.os2voice.org |
[Previous Page] [Next Page] [Features Index] |
By: Mark Dodel madodel@ptd.net
One of the other important features of Ghostview over Acrobat is that Acrobat
is strictly a viewer, while Ghostview can convert viewed formats to other formats.
There is no Adobe distiller for OS/2 (a PDF development tool used to create PDF
document files). But you can print a document to a postscript file, then view it
with Ghostview and then save it in PDF format. some folks have had some success
running Adobe's PDF Distiller under OS/2 using Odin (the win32 -OS/2 project now
under the auspices of Netlabs - http://www.netlabs.org/odin).
Ghostview is available for both OS/2 as well as the win32 platform. Ghostscript
is available in Unix/VMS,OS/2, DOS, MAC and windows versions.
Next run the Ghostview os2setup.exe. Ghostview 2.8
will support versions 4.0 to 6.99 of Ghostscript so as part of the installation
you have to tell it which version of Ghostscript you are installing. You can also
choose to install either or both of these components. You also have to enter a main
directory to install it to. Ghostview and Ghostscript are then installed to separate
subdirectories and a Ghostview desktop object is created. The beauty of installing
Ghostview, is that you don't have to know anything about the command line Ghostscript.
Ghostview takes care of everything.
The installed Ghostview uses about 1.1Meg of space, Ghostscript about 6Meg. In
addition about 3.8Meg is used for fonts.
Ghostview differs from Acrobat in many ways. when I first tried to read a PDF
file, I noticed that the Index frame was missing on the right and I kept hitting
the Page Down key, but nothing was happening. Turned out to move between pages you
can either hit the Space bar to move down a page, or the "+" and "-"
keys to move back and forth in the document. Whereas with Acrobat you have to select
a language version to install, Ghostview allows you to select between English, Italian,
French and German. Of course this is an advantage for Acrobat if you need something
other then these four languages, like Dutch, Spanish or Swedish, though the Chinese,
Portuguese and Japanese versions available for windows are not available for OS/2.
Ghostview/Ghostscript is more then just a PDF viewer. You can view post script
files and either convert them to PDF or extract the text from them to an ASCII text
file. In addition you can convert to or read EPS files (Encapsulated Post Script).
You can also select to print a document or pages as a bitmap using one of several
bitmap versions (bmp16,bmp256, bmp16m).
Next I fired up Netscape Communicator for OS/2 and opened Thomas Gunzelmann's
review of Papyrus in this month's issue of the newsletter. That seemed like a good
choice since it has several images in it. I clicked on Print then selected the Postscript
printer, checked the properties and selected 600DPI(choices were 300DPI or 600DPI)
and then saved that. I then printed the html page to "papyrustest.ps"
which created a 16,678,461 byte file in my netscape\program directory. That's one
big file. Even taking into account that the graphics were a total of about 330,000
bytes, 16Meg was more then I had expected. I then opened that .ps file in Ghostview.
It took about 29 seconds to open the first page.
It was opened as a 9 page document, with the HTML TITLE and the file path at
the top of each page, and the page number and creation date and time at the bottom.
I assume this was created by Netscape when printed. All formatting appeared to be
preserved, though the text appeared a bit fuzzy, though completely readable. Changing
to use a Text Alpha of 4 in Ghostview's "Media" "display options"
didn't seem to help this a bit. This setting turns on anti-aliasing font rendering,
which renders the document a little slower, but smoothes out the fuzzy edges of
the text. There is a similar setting for images as well called the Graphics Alpha.
Changing that made the text look great. When I checked Netscape I realized it was
using the Times New Roman MT font which is a bitmap font. I changed that to Times
Roman (Tms Rmn), then printed the same HTML page to a postscript file as before.
The resulting .ps file was almost half the size of the first try (8,823,076 bytes).
So using a vector font makes a big difference in file size when creating postscript
files.
One difference I noticed between the original HTML and the postscript file was
that the article title was olive in the HTML version, but gray in the postscript
file. Then it dawned on me that the printer I selected was a black and white laser
printer. Interesting that the graphic images were all in color, just the text wasn't.
So then I went back into the printer driver install and looked for a color postscript
printer. I selected the first one I found the Apple Color Laser printer. I then
re-printed the postscipt file from Netscape using this new printer and all the text
colors were exact. Even the HTML links were blue. unfortunately PDF doesn't support
hyperlinks, so any links are for show only. One interesting thing is that the color
output postscript file was slightly smaller then the original grey scale one, coming
in at about 7Meg at the same 600DPI resolution. The resultant PDF of the full color
version was also smaller at just about 1 Meg. In addition there were 10 pages total
now, and instead of splitting images across pages it started the image on the next
page. So the output may be dependent on which postscript driver you choose to create
the input file.
Also interesting that I noted an error in the HTML layout of this page when I
browsed the postscript version, that I had missed before. Also of note, one of the
images crossed a page boundary so part of it was on one page and the rest on the
next page. So if you want to convert an HTML page to postscript or PDF you have
to take into account where the page boundaries are so images and paragraphs aren't
split in an unexpected manner.
I then created a PDF, which took only about 30 seconds. To do this you select
Print, then choose PDFWRITE as the printer, select print to file and choose a resolution.
Resolution choices include 72DPI, 300DPI and 600DPI. Also select what pages you
want to print. My first attempt resulted in only the current page being printed
to a PDF file. The help suggests 300 DPI, saying 72DPI will result in very rough
looking fonts. I selected 600DPI, and that created a 1,267,864 byte PDF file, using
the postscript file from the Times Roman vector font. So the PDF file was about
a seventh the size of the original postscript file.
Thinking that cutting down the resolution might shrink the size of the PDF file,
I printed the same file selecting 300DPI. Boy was I surprised that the file size
actually increased a tiny bit. Dropping it still further to 72DPI, decreased the
resultant PDF file size by about 600 bytes. Even at 72DPI the file was readable
with anti-aliasing enabled.
It would be nice if the install for Ghostview allowed you to change the system
wide default association for PDF's from Acrobat to Ghostview. It does set up an
object with associations to "*.PDF", "*.PS" and "*.EPS".
Though even after I removed all associations from the Acrobat Reader Object properties,
and added "Acrobat Document" and "*PDF" to the associations
for the GSview object, but Acrobat remained the default application for all PDF
documents on my system. I did successfully change the default for PDF documents
by using the SETDEFV.CMD function available in any fixpaked Warp 4.
C:\OS2>setdefv "GSview" temp.pdf
If you need to create a PDF document under OS/2, or read a postscript file, then
this is your solution. Since PDF files don't seem to suport hyperlinks and just
one article from the newsletter (albeit one with quite a few images) converted to
PDF was over one meg in size, I don't think we'll be seeing the newsletter in PDF
format anytime soon. But it's still nice to know there is an easy way to create
PDF couments under OS/2.
Ghostview 2.8 - http://www.cs.wisc.edu/~ghost/gsview/get28.html
Ghostscript 6.0 - http://www.cs.wisc.edu/~ghost/aladdin/get600.html
Adobe PDF Viewer for Java - http://www.adobe.com/products/acrviewer/main.html
Adobe Acrobat Reader for OS/2 - http://www.adobe.com/products/acrobat/morethanreader.html