Skip to content

"Deprecated API usage: getDocument" with Functioning Component #124

@AdamWhitehurst

Description

@AdamWhitehurst

My team currently has a Component that implements <FileViewer> that works, but our tests warn us that:

console.log node_modules/react-file-viewer/dist/index.js:11
      Deprecated API usage: getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument

Would love to see this updated as react-file-viewer a good library.

Similar issue (but this appears to be a non-functioning component): #83

Relevant information on updating package:
mozilla/pdf.js#8538
mozilla/pdf.js@5135aa9#diff-dd42e9b2d2a652b8e312efa567698aa6

It appears the call to getDocument simply needs to be updated to the simplified parameters, with callbacks being set with onProgress, onPassword, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions