Detailed description of issue
Is it possible to viewing linearized document using fast web view on password protected pdf?
When I pass linearized password protected pdf to viewer, I can see that is downloading using range bytes and 206 Partial Content but pdf is no showing until not be fully downloaded.
Expected behaviour
Password protected linearized pdf is showing immandiantelly without waiting for whole file.
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here
This happening for all files. Files are hosting as static file on server and supported range requests.
It’s look like this not working for protected and for not protected files too. Even with your demo website.
Is it possible to using fast web view with password protected pdf? Pdf file don’t have to be fully downloaded first?
This is my sample code: this.pdfViewerInstance.UI.loadDocument('https://mywebsite/files/foo.pdf', { filename: 'myfile.pdf', extension: 'pdf', password: '1234' });
What is the size of the PDF file you are using? Can you provide a sample document for reproducing?
Best Regards,
Kevin Kim
Web Development Support Engineer
PDFTron Systems, Inc.
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here
These files have around 200MB, but when we using fast web view we don’t should get 206 status?
File is showing only when is fully downloaded but should be showed partially and rest of the file should be downloaded in background, right? I prepare sample document for you.
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here
It’s true that on Firefox I can see 206, but still I can see the document only when they are fully downloaded.
As I understand the problem is only with Chrome? Do you plan to fix it on chrome?
Moreover, when I investigated webviewer pdfjs express vs pdf tron I noticed that pdftron worked correctly for any browsers - document is showed almost immadiantely and rest of them is downloaded in background. Should pdfjs express and pdftron they not work the same for this case (fast loading)?
As Logan mentioned in the other thread, this is the expected behaviour of PDF.js. It downloads range requests on demand/when needed, and in parallel downloads the entire document. I am not sure why they implemented it this way, but this is intended.
As for the issue with Chrome, I will add the issue to our backlog to be worked on in the future.
Best Regards,
Kevin Kim
Web Development Support Engineer
PDFTron Systems, Inc.
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here