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

Load multiple pages with [page] attribute option #50

Closed
Jeya-Prakash opened this issue Apr 5, 2019 · 4 comments
Closed

Load multiple pages with [page] attribute option #50

Jeya-Prakash opened this issue Apr 5, 2019 · 4 comments
Labels
question Further information is requested wontfix This will not be worked on

Comments

@Jeya-Prakash
Copy link

Jeya-Prakash commented Apr 5, 2019

I want to set page ranges (like 3-5) for a 7 page PDF document which is already rendered in the PDF viewer. How to achieve this with [page] attribute ?

@stephanrauh
Copy link
Owner

The [(page)] attribute controls which page is shown first when the PDF is loaded (or when the attribute changes). Hence it takes a simple number.

What do you want to achieve with the page range? Does "3-5" mean that the first pages are excluded from the PDF viewer, so you can't scroll to these pages?

@stephanrauh stephanrauh added question Further information is requested waiting for the user's answer labels Apr 5, 2019
@stephanrauh stephanrauh changed the title Load mulitple pages with [page] attribute option Load multiple pages with [page] attribute option Apr 5, 2019
@Jeya-Prakash
Copy link
Author

Jeya-Prakash commented Apr 6, 2019

Yes.. 3-5 range means user will have to see the 3rd, 4th & 5th pages only from original 7 page document.
I am expecting same as how google chrome print range works.

Reference :
image

@stephanrauh stephanrauh added wontfix This will not be worked on and removed waiting for the user's answer labels Apr 6, 2019
@stephanrauh
Copy link
Owner

After an hour of Googling, I believe that Mozilla's PDF.js library doesn't support that feature. ngx-extended-pdf-viewer is a simple wrapper around PDF.js, so that's bad news.

However, I can offer a workaround. Have you discovered the Hummus library already? Among many things, it can generate PDF files consisting of a few pages of the original file. As far as I can see, it's a server-side library.

https://github.com/galkahana/HummusJS/wiki/Embedding-pdf

@Jeya-Prakash
Copy link
Author

Thanks man, will look into it 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants