Skip to content

Initial Page Property #2014

@LironToledo

Description

@LironToledo

Before you start - checklist

  • I understand that React-PDF does not aim to be a fully-fledged PDF viewer and is only a tool to make one
  • I have checked if this feature request is not already reported

Description

Hey there, been experimenting with the library the last few days. I've been looking for a few hours now and while it's possible i've missed it, i can't seem to find anything in the README to explain how one might set the starting page in a pdf while still rendering all pages.

I feel like it might be quite useful, to myself of course, but also to others who want to initialise their pdfs on specific pages without having to utilise the DOM to automatically scrolling (which is how I'm working around this for now)

Proposed solution

Add an initialPage prop on the <Document> component that will both start doc on that page automatically and render it first. The prop could be an int or ref maybe.

Alternatives

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions