[poppler] Loading big files from the web

Leonard Rosenthol leonardr at pdfsages.com
Sun Oct 5 11:24:07 PDT 2008


PDF has supported "fast web viewing" for over 10 years now via a  
feature of the language called Linearization.  This feature, in  
conjunction with a feature of HTTP called "byte serving" is how  
Acrobat/Reader are able to display documents in browsers quickly.

I recommend you read up on these two technologies and simply use them  
- rathe than reinventing the wheel.

Leonard


On Oct 5, 2008, at 1:20 PM, Тодор Африкански wrote:

> Hello all,
>
> I have this task I need some help with. I need to load large pdf  
> files (over 100mb) from the web, so I can not afford to wait for the  
> whole file to load before displaying something on the screen. I plan  
> to write a custom stream class that will be able to download the  
> files in chunks. So when poppler needs to read at the end of the  
> file I will download this chunk. Then, when some page needs to be  
> displayed, I will read the part of the file containing the page. But  
> I need to make poppler load the pages only when they are needed. For  
> example, when I display the first page, I don't want to download the  
> rest 1400 pages, because nobody reads 1000 pages in one sitting. So  
> I need to make some changes to the poppler source. Can you give me  
> some advice what I need to modify to make poppler read the page data  
> only when it is actually needed (eg displayPage), not all pages at  
> once.
>
> Thank you,
> Tosho
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler



More information about the poppler mailing list