pdf streams

HI, I am looking into implementing loading a pdf document from a stream. With this option I should be able to start the viewer while the file is still transferring from the server to the client? Does anyone have examples of doing this?

Currently the only way to stream a remote PDF is to satisfy the following 3 conditions.

  1. PDF is saved as Linearized (Fast Web View)
  2. Hosted on a server that supports byte range request headers
  3. Use PDFViewCtrl.OpenUrlAsync

Currently there is no way to create a PDFDoc object itself that is not fully available.

Even with the PDFViewCtrl.OpenUrlAsync way, it is aimed at read only operations (e.g. viewing), and if you plan on editing the PDF you need to use the OpenUrlAsync callbacks to track what pages are available for modification.

If your stream truly supports random access (and not just streaming) then you could get partial equivalency of PDFViewCtrl.OpenUrlAsync by implementing your own custom filter and passing that to the PDFDoc constructor. But you would have to do some optimizations for this to be decent, such as downloading larger blocks of bytes than was actually requested, otherwise there would be too many network requests.