:: Re: [DNG] printing in a D-Bus free …
Inizio della pagina
Delete this message
Reply to this message
Autore: Nelson H. F. Beebe
Data:  
To: dng
Oggetto: Re: [DNG] printing in a D-Bus free system
Rick Moen <rick@???> writes on Thu, 15 Mar 2018 13:19:50 -0700:

>> ...
>> 'Successor' is not quite the right description, IMO. The key point is
>> that PDF (which, to be sure, was developed later) is bidirectionally
>> equivalent and semantically identical to PostScript. You can convert a
>> .ps file to .pdf one and back, and not lose any substantive content in
>> either direction. The primary physical difference is that the PDF
>> version will be stored compressed, while the PS version will not.
>> ...


I must rebut those statements.

While PDF and PostScript certainly can share much of the parser
implementation, and do, in both Adobe printer software, and in Artifex
Ghostscript, there are important differences. Here are some (but by
no means all) of them:

* PDF supports several compression options that PostScript does not.

* Both PostScript and PDF have support for compressed (and binary)
input, in practice, most PostScript files produced by software have
been plain text files, while PDF files are usually a mixture of text
and binary data.

* PDF supports several image bitmap formats that are unknown to
PostScript.

* PDF supports image transparency, whereas PostScript uses an opaque
printing model.

* PDF requires its resources (notably, fonts) to be defined in
preamble or postamble area, whereas PostScript allows font character
definitions to be trickled in as needed (that was a necessity with
the small memories of early PostScript printers).

* PDF supports extended character sets (notably, Unicode), whereas
PostScript was based on 8-bit extended ASCII.

* PDF handles more, and more advanced, font formats than the Type 1,
2, and 3 fonts that PostScript recognized.

* PDF has provisions for external document links (Web URLs) and video.
PostScript does not.

* PostScript is an extensible programming language, with loops,
user-defined procedures, user-controllable dictionaries, and so on,
while PDF has none of those.

* PostScript has curve representations that preserve smoothness at all
resolutions, whereas conversion to PDF requires curves to be reduced
to consecutive straight line segments; those segments are small
enough that in normal document viewing, there is little or no visual
difference between PostScript and PDF versions of the same document.
However, under magnification, jaggies appear in the PDF image that
could/would be invisible in the PostScript image.

A key motivation for Adobe's introduction of PDF was fast, and
parallel rendering for printing, and for Web viewing. PDF has been a
key technology in making many large-city newspapers effectively
national newspapers, printed at many locations in a country at the
same time, thanks to fast network document transfer. Previously,
important newspapers would be printed in one, or a few, locations,
then shipped by road and/or rail to distant locations, sometimes with
delays of a few days (such as was the case for the New York Times
coming by truck to my western US state).

With PostScript, user-written procedures can require arbitrary
execution time, and because font character definitions may be defined
as needed, a PostScript document must be processed in page order for
it to be rendered, even if some of those pages are never displayed on
the screen or a printer. By contrast, once the PDF file resource
sections have been processed, PDF file pages are completely
independent, and can be rendered in any desired order, and
sequentially, or in parallel. There are no loops possible, so page
rendering has essentially bounded time. Already in the 1990s, one
large vendor had a PDF printer capable of nearly 500 pages/minute
output, using 20+ processors for parallel page rendering.

PDF file `Web optimization' primarily means moving font (and other)
resources to the start of the file, whereas for document production
purposes, it may have been more convenient to put them at the end of
the file. That way, once all of the resources have been received, a
PDF viewer (e.g., in a Web browser) can start showing page images,
even though remaining document pages may have yet to arrive over
the network.

Also, PDF files contain a page-location table resource that allows
access to arbitrary pages in constant time; as noted earlier, to show
page N of a PostScript file, you must first process all N-1 earlier
pages.

In summary, yes, the transformations PDF-to-PostScript and
PostScript-to-PDF are possible, but while the end results may be
similar, they are by no means identical.

For more on PostScript and PDF, see the extensive bibliography at

    http://www.math.utah.edu/pub/tex/bib/postscri.bib


[change .bib to .html for a similar Web view, but with live
hyperlinks].

As an example of differences between the two markup languages, look at
the book in entry Casselman:2005:MIM, which shows how to program
figures in PostScript that are impossible to describe in PDF without
reduction to tiny graphical chunks, a task beyond human ability.
Entry Thomas:1988:PCb is a cookbook of fancy PostScript programming.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe@???  -
- 155 S 1400 E RM 233                       beebe@???  beebe@??? -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------