Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I always thought that PDFs and PostScript files are quite similar, even though PostScript is a turing complete language.

Is there a reason PostScript is a lot slower when rendering (tried with evince on Ubuntu) than PDF or are the reader just a lot less optimized?

share|improve this question

I've no way to currently check if my assumption is correct -- but here it goes anyway:

I suspect that evince cannot directly render and display PostScript on screen. Maybe it can only do so for PDF. So it may use a trick for PostScript files: behind you back it converts them to a temporary PDF file and display that one instead.

Try to install the (very old-fashioned) gv PostScript viewer on Ubuntu:

 sudo apt-get install gv

and then

 gv /path/to/

and see if it is any faster. (gv also uses PostScript for rendering, but doesn't convert to PDF.) Or you use Ghostscript directly

 gs /path/to/

But don't forget one thing: exactly because PostScript is a programming language, you can design PostScript files which are rather short in Bytes, but make the interpreter go through a loop with thousands of iterations (for example to compute + render a fractal) before it displays the file content on screen.

PDF doesn't have 'loops' and computations like that...

share|improve this answer
Here's a fractal in PS, which contains an infinite loop producing endless pdf pages. 3.1K produces 10's of Megabytes per page (too much for my Kindle). – luser droog Sep 14 '13 at 7:11

But most importantly, PDF works page-wise: each page is mostly a self-contained entity, so you can skip to any page and the reader can start rendering that page immediately.

A PostScript document, instead, is a single big program, which means that the PS viewer has to execute it all the way to the page you want before being able to display it correctly.

Also, PDFs contain objects to be rendered, while PostScript is a programming language that instructs a renderer to draw such objects, thus PDF is, in some sense, pre-digested compared to PS, and thus quicker to interpret.

share|improve this answer

It depends on the PostScript code. One could write a 3D rendering algorithm in PostScript and use embedded AutoCAD files as pictures. It will take much time to render while PDF will contain prerasterized images. In some cases PostScript will be much faster to render. Unfortunately most popular publishing software emits very inefficient PostScript code. But converters PS->PDF are able to optimize their output for fast rendering.

share|improve this answer

PostScript is a programming language.

PDF is a document format.

Because PostScript is a programming language, the entire contents of the document must be computed step by step. While PDF supports a limited subset of PostScript for vector graphics, it is designed specifically as a document format and does not require this sort of computation.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .