Streaming PDF File For Android and IOS

Product:8.0.2-beta03

Product Version: PDFTron SDK
I had a problem when loading the large file from the server, I had a research document I found Stream PDF File feature, but I don’t know how to can implement with react native?

Can support me or give me an example same case

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi @dongnhutpham,

Could you clarify in some more detail the problem you are seeing when loading large files from the server?

The PDFTron React Native wrapper uses streaming by default on iOS and Android so you shouldn’t need to make any changes to stream the document.

The requirements are that the document is linearized and hosted on a server which supports byte-requests (as described on the page you linked.

Is this the case for your documents and server?

my problem is needs a fast render large file from the server about 50-100MB, but I don’t know how to implement feature streaming?

The PDFTron React Native wrapper uses streaming by default on iOS and Android but how to know it working? Because with document is must be use function mPdfViewCtrl.openUrlAsync but in my code just use
Uri fileUri = ReactUtils.getUri(getContext(), path, false); mPdfDoc = openPDFUri(fileUri, "");
What different with 2 method?

Hi,

Are you able to share a working sample project?
Where are you using that code snippet in your project?
Is there a reason you’re not using the default way to open a document in the React Native wrapper?

In any case, the openPDFUri API does call openUrlAsync under the hood if it’s passed a remote URL as the parameter. So if your fileUri is a link to a remote document then openUrlAsync is being used.