Operating System - HP-UX
1851078 Members
2450 Online
104056 Solutions
New Discussion

Re: Ghostscript (pdf2ps) on UNIX generates 10x bigger Postscript File than Acrobat for UNIX...

 
Alzhy
Honored Contributor

Ghostscript (pdf2ps) on UNIX generates 10x bigger Postscript File than Acrobat for UNIX...

Amigis y Amigas,

Do any of you know specific switches to pdf2ps ot Ghostscript (gs) that will at least match PDF to PS conversion efficiency as Acrobat Reader for UNIX? I am seeing a 10x difference in resultant PS file sizes...

Syntaces used:

GS/PDF2PS:

user$ pdf2ps testfile.pdf
user$ mv testfile.pdf.ps file1.ps

Acrobat Reader:

user$ /opt/Acrobat5/bin/acroread -toPostscript testfile.pdf
user$ mv testfile.pfg file2.ps

user$ ls -l
total 342976
-rw-rw-r-- 1 root sys 13556789 Apr 18 08:28 testfile.pdf
-rw-r--r-- 1 root sys 132314526 Apr 20 13:46 file1.ps
-rw------- 1 root sys 16155351 Apr 20 13:41 file2.ps


Thanks!
Hakuna Matata.
1 REPLY 1
Bill Hassell
Honored Contributor

Re: Ghostscript (pdf2ps) on UNIX generates 10x bigger Postscript File than Acrobat for UNIX...

pdf2ps (according to the man page) has only a couple of options such as -dLanguageLevel=1 which limits the output to Postscript to level 1 (simplest, and black&white only). The rest of the options belong to gs (ghostscript). However, Adobe's acroread program was written by the same company that invented PDF and also Postscript, so it is quite reasonable to assume that their product is more likely to be efficient. pdf2ps is actually a language translator, not unlike a French to English translator. PDF is a document definition language which doesn't know or care about printers at all. Postscript is a page definition language that directs yet another language interpreter (a printer's formatter) to translate printing elements like graphics and fonts into pixels (for a laser or inkjet printer) or vectors for a pen plotter.

If you've ever used a program generator (something that takes high level code and generates a compiliable program, you'll notice a lot of inefficiencies simply due to the code generation processes.

So look at the gs options but I don't think you'll find an optimizer option.


Bill Hassell, sysadmin