Could not use incremental download , Reason: Could not retrieve Content-Range header

Product: WebViewer

Product Version: 8.0.1

Please give a brief summary of your issue:
(Think of this as an email subject)
Pdf pages are not loading incrementally, instead whole pdf is getting loaded and that is taking a lot of time

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
Whenever I am opening pdf’s in client side, I am getting this message in console that says Could not use incremental download , Reason: Could not retrieve Content-Range header.
Even after setting the Access-Control-Expose-Headers: Content-Range in server side the issue still persist.
We are using amazon aws s3 for storing the pdf

Please provide a link to a minimal sample where the issue is reproducible:
This is how I am setting CORS in node app

    private config(): void {
      const options: cors.CorsOptions = {
        allowedHeaders: [
        credentials: true,
        origin: '*',
        preflightContinue: false,
      };;'*', cors(options));{ limit: '50mb', type: 'application/json' }));{ limit: '50mb', extended: true, parameterLimit: 50000 }));':method :url :status :res[content-length] - :response-time ms'));
    }`Preformatted text`

This is the message i am getting and that is stopping me from testing my linearized pdf for fast loading of pages:


The issue seems to be related to your server configuration. I just found a post regarding this , please take a look and make sure the server is returning the correct response header parameters.


The thing is I am serving pdf from aws s3 bucket and even when It is a linearized pdf (as mentioned in above attachment of documentation of pdftron) the incremental download is not working, it just says could not retrieve content-range header .
I am stuck at this point, any suggestions would be really helpful.

Could you provide a sample link to your file on s3? I can help try on my side. Thanks.


Here is one of the link to s3 file:



I tried loading the test file with our online sample - JavaScript PDF Viewer Demo . And I got error saying that the file is not linearized, as shown below.

Also the instance.docViewer.getDocument().isLinearized() returns false.

Could you double check that if this test file is linearized? Thanks.


Hi @Wanbo_Li How can I make this pdf linearize, I am storing these pdf’s in s3 bucket so is their any way I could write a lamda function to linearize this pdf’s


You can try the getFileData API and pass in options with Core.SaveOptions.LINEARIZED flag. Code sample as below:

var doc = await instance.docViewer.getDocument().getFileData({flags: instance.Core.SaveOptions.LINEARIZED});



Thankyou @Wanbo_Li I am able to solve this issue and it is working fine for me

Great! No problem.


Hey @Wanbo_Li
I got the same issue in version 8.10.0. It’s working on pdf file but not in image file through S3 bucket.
Issue ----

version ----

Please suggest me