Skip to content

Feature request: Add support for pdf.js DocumentInitParameters type to RPSrc #50

@jameswaudbycontentcatalyst

Description

Large PDF files are currently restricted to using the default pdf.js loading options which means the entire file is fetched on load even when range requests are being utilised. During this fetching it isn't possible to view pages of the PDF file.

Currently the RPProvider component src prop only accepts the string or URL types and explicitly excludes DocumentInitParameters, but if support for this were added we would be able to make use of the different loading options pdf.js supports.

I am particularly interested in the disableAutoFetch and disableStream options, elsewhere I have found enabling these options makes the initial pdf data fetch requests on page load much smaller and further page data is then only fetched as pages come into view.

Image

I understand there may be a reason why DocumentInitParameters has been explicitly excluded from the RPSrc type that may make this difficult to implement.

Thank you for your work on this useful library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions