[pdfJS Viewer] How to get the current page number from pdfjs?

Forge Component
(8)
Published on 19 Jun by Eduardo Jauch
8 votes
Published on 19 Jun 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?

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.

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.


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

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.