News for hackers. Stuff that matters.
Re:Firefox introduces PDF viewer by baudehlo on Wednesday February 20, 2013 @01:24PM (#5252209)
That's interesting, because PDFs are an inherently un-streamable format. It requires seeking within the file to work (hence why command line PDF tools can't take STDIN for the PDF file - or they fake it by copying to a temp file first).

I wonder how google got around that problem.

Re:Firefox introduces PDF viewer by jlarocco on Wednesday February 20, 2013 @02:12PM (#5252538)
Actually, PDF files can be optimized for streaming: http://acroeng.adobe.com/wp/?page_id=27

It's covered in Annex F of the PDF spec: https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/pdf...

Re:Firefox introduces PDF viewer by dunham on Wednesday February 20, 2013 @02:08PM (#5252504)
"Linearized" PDFs have extra info up front to allow streaming and random access (via range requests).
Re:Firefox introduces PDF viewer by jevinskie on Wednesday February 20, 2013 @01:46PM (#5252382)
You could try to progressively render the file, pausing when a required forward reference isn't within the data you have downloaded so far.
Re:Firefox introduces PDF viewer by jammmuel on Wednesday February 20, 2013 @02:10PM (#5252526)
That seems to be what they do, in my experience.
Re:Firefox introduces PDF viewer by hackmiester on Wednesday February 20, 2013 @01:57PM (#5252444)
Well, I imagine that they download the file in the background, and if the viewer seeks to a non-downloaded part of the file, then it just blocks with "Loading" until that part is downloaded.
Re:Firefox introduces PDF viewer by fafner on Wednesday February 20, 2013 @05:56PM (#5253959)
If I remember correctly the PDF Spec says the files should be read backwards. The object table is at the end of the file.
Re:Firefox introduces PDF viewer by benatkin on Wednesday February 20, 2013 @01:55PM (#5252429)
engineers gonna engineer