PDF

Mark Waddingham mark at livecode.com
Mon May 14 13:30:17 EDT 2018


On 2018-05-13 05:38, Richard Gaskin via use-livecode wrote:
> Alex Tweedly wrote:
>> So I think we're a few years away from being able to replace PDF with 
>> ePub :-(
> 
> As I said, long-term.

Hehe - I'd actually vouch for 'never' - PDF and ePub serve two entirely 
different purposes so I'm not sure the comparison is particularly 
helpful apart from perhaps making the point that you should choose the 
right tool for the job you are undertaking!

The important thing to remember about PDF (and PostScript - from which 
it came) is that they are for a very specific thing: they are 'page 
description languages' - they describe how ink should be applied to a 
page to reproduce a document in exactly the same way as the author 
intended.

The utility of the format is that it replicates this very physical 
process exceptionally well, and as it is an embodiment of a physical 
process (printing / typesetting) it fits perfectly into workflows and 
processes which have been around a lot longer than anyone on this list 
(since we started using lumps of metal which were pressed onto flat 
surfaces to replicate the written word en masse - around 1450, maybe?).

> General market inertia coupled with Adobe's power and their dependency
> on PDF will certainly keep adoption of simpler, more flexible, and
> less proprietary formats at bay longer than would be useful.

I'm not sure whether one considers PDF proprietary or not is very useful 
because what PDF (and Postscript) is and how it works has been available 
for decades.

Admittedly, originally you had to buy the reference books - but these 
days you can (and have been able to for at least 15 years) download PDF 
versions of them. These reference books are not only very well written 
(they certainly count as the best pieces of technical writing which I 
have ever read) describe the format precisely, accurately and in enough 
detail that anyone who has enough time and a grounding in document 
structure, typography and 2d vector graphics (which are all very well 
understood and documented things in and of themselves) can reproduce a 
system which reads the formats, processes and renders them with complete 
faithfulness.

Furthermore the 'archival subset' of PDF (which is most of it) has been 
an ISO standard now since 2008. It continues to be maintained, to keep 
it inline with evolutions of the PDF format itself - the next revision 
is due this year.

It is true that Adobe are the main implementors of PDF tools - but there 
are many others. GhostScript has been around for decades and it had 
certainly reached a point where it could be used as a replacement for 
any closed-source offerings by the early 2000's (or if it wasn't quite 
right you could 'fix' that yourself). FoxIt have long had a PDF toolkit 
- the reading/rendering part was bought and open-sourced by google a few 
years ago (PDFium). There have been many others too both closed source 
and open source (some not complete, admittedly, and some only focusing 
on one half maybe reading, or writing - but if the PDF format had really 
been proprietary in the true sense of the word as I take it to mean, 
then none of that would have likely happened).

Also there are the implementations of PostScript/PDF* which you never 
see - they are burned into the firmware of printers both low-end and 
high-end - these days it is rare to find any such devices below even the 
$1000's of dollar mark which will have Adobe software in them and yet 
they all interoperate perfectly with computers which can emit 
PostScript/PDF.

Whilst PDF might have many 'add-on' bits, what it always has been and is 
at its core has not and will never change. One could argue quite 
strongly that PDF as it is now is essentially complete - from the point 
of view of being a language to describe how to 'print' a document made 
up of text, pictures and vector graphics... Which was always its primary 
purpose.

> But tooling will catch up to modern device usage patterns soon enough.

I'm not sure how tooling exactly fits in here - we have it all already. 
If you want dynamic layout, then use a system which offers that, or put 
your own together using technologies which are designed for screen and 
interactive display (e.g. HTML/CSS/SVG).

However, if you want to produce an unchanging representation of a 
document (wherever it comes from), which is a complex mixture of text, 
images and graphics, and want all the fine details about color and other 
such things to be preserved 100% then PDF is and will continue to be 
(for a long time) the 'go to' for that.

It isn't as if you have to have one or the other - you can have both - 
and I'd generally urge anyone dealing with such things to always support 
'print to pdf' as it gives you something which will mean people will at 
least be able to 'see' what they did 10 years hence, even if they can't 
open the original document any more (which is more likely than you might 
think).

The above is why the comparison to ePub is not that great. PDF is 
incredibly well defined - the ISO standard even contains all the 
equations you need to replicate all the complex blend modes and such, as 
well as a well written abstract description of how the rendering process 
should occur. The technologies which ePub sit on are nowhere near that 
yet - JS, HTML, SVG, CSS are all 'defined' in standards set forth by the 
W3C or others, yes - but as standards they are relatively poor in the 
sense that the words they contain are not sufficient for replication. 
SVG is getting a bit better, but its years away realistically, and I 
have little hope for CSS/HTML - especially since they became 'Living 
Standards'.

Are you sure your ePub documents which you create now will work in a 
browser in 10 years time? I'm not. However what I am sure of is that PDF 
documents which I produce now will still render in PDF viewers in 10 
years time though, because PDF is *actually* a true standard, one which 
(at his core) has changed little in 20+ years.

> In the meantime, enjoy horizontally scrolling back and forth with
> every line of PDF text on your phone. ;)

PDF is nothing to do with that. PDF is about representing the printed 
page. Letters, books, flyers, postcards, business cards (any printed 
media in fact) don't have scrollbars, nor can they be resized so it 
isn't any part of what PDF is about - so don't expect it to be useful in 
an environment where that is important!

Warmest Regards,

Mark.

* There isn't really much of a difference between the two from a usage 
perspective - if you have a completely faithful PostScript 
implementation, then you have PDF too - it was designed to work like 
that so existing PostScript systems could also understand PDF.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the Use-livecode mailing list