Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a plan for page thumbnail? #898

Closed
2 tasks done
suikodev opened this issue Nov 29, 2021 · 2 comments · Fixed by #1519
Closed
2 tasks done

is there a plan for page thumbnail? #898

suikodev opened this issue Nov 29, 2021 · 2 comments · Fixed by #1519
Labels
enhancement New feature or request

Comments

@suikodev
Copy link

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

I understand that React-PDF does not aim to be a fully-fledged PDF viewer and is only a tool to make one, but since mostly all PDF viewer have page thumbnails for preview, i think it will be helpful to provide Thumbnail component. The Thumbnail component's usage could just like the Page component(be placed inside , provide pageIndex or pageNumber to choose which page's thumbnail to render...).

Proposed solution

I have read the source code about how to generate thumbnails in pdf.js and some code of react-pdf, if you think my idea is adoptable, I really hope you can give me a chance to work on this:)

Alternatives

No response

Additional information

No response

@suikodev suikodev added the enhancement New feature or request label Nov 29, 2021
@wojtekmaj
Copy link
Owner

I don't think <Thumbnail /> could differ a lot from <Page />.

For rendering thumbnails, go for something like

<Page 
  pageNumber={pageNumber} 
  renderAnnotationLayer={false} 
  renderTextLayer={false} 
  width={100}
/>

@wojtekmaj
Copy link
Owner

And I was wrong! There's a tiny but very important difference: Thumbnails should not register themselves as "link target" which the page is scrolled to upon clicking an internal PDF link. This, plus some accessibility features.

wojtekmaj added a commit that referenced this issue Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants