212
Views
4
Comments
[pdfJS Viewer] How to get the current page number from pdfjs?
Question
pdfjs-viewer
Web icon
Forge asset by Eduardo Jauch

I know the page number is in it. But I want to extract the current page number as a local variable. I did a lot searching ending with iTextSharp. But it is only for java stack.

So is there any way to get the current page number?

2020-02-28 09-46-54
Eduardo Jauch

Hello Jie,

The library used by this component seems to allow it, even if the component does not.
I'll investigate it and if there is an easy way to implement a method that allows you to get/set the current page number, I'll implement it and upload a new version.

But may take a few days before I am able to do it.

Cheers.

UserImage.jpg
Jay Cox

Eduardo Jauch wrote:

Hello Jie,

The library used by this component seems to allow it, even if the component does not.
I'll investigate it and if there is an easy way to implement a method that allows you to get/set the current page number, I'll implement it and upload a new version.

But may take a few days before I am able to do it.

Cheers.

Hi Jauch, 

Thanks a lot. Also, would you mind adding more properties to hide everything except the file content in the view window? Since i can get/set the page number, I want to manipulate the view content according to my needs.

Thanks.


2020-02-28 09-46-54
Eduardo Jauch

If you provide a list of what you wants to do, I can see if it is possible to implement :) (no guarantees)

UserImage.jpg
Jay Cox

Eduardo Jauch wrote:

If you provide a list of what you wants to do, I can see if it is possible to implement :) (no guarantees)

Thanks, actually, I want to hide everything in the view window. Only the content of the file shows in my container. If I can get the page number and manipulate it, I can use it to trigger some events on certain page.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.