We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF Document Coordinates and Page Numbers - Client Side

Hello Support team,

I was curious to know, is it possible to capture coordinates and the page number, when a PDF document is viewed in a web browser?

A perfect scenario would be:

A user selects some text or some part of the PDF document on the web browser (perhaps displayed in an iFrame), and gets the coordinates and the page number of the text that was selected.

Does the Aspose JAVA API support onclick/ mouse events on clients side?

Hi Troy,

Thanks for your inquiry. I am afraid Aspose APIs do not provide any GUI functionality. However you may check our sister concern GroupDocs, it provides a document viewer. Hopefully it will help you to accomplish the task.

We are sorry for the inconvenience caused.

Best Regards,

Thanks Tilal for your response.

Currently - we are not looking to purchase, however I did notice that the aspose api does support javascript functionality that invokes the pdf javascript?

If this can be done, is there a way to get mouse coordinates over the pdf document?


Hi Troy,

Aspose.Pdf for .NET supports the feature to Add JavaScript to PDF file but getting the mouse coordinates depends upon the Script which you have added inside PDF. Please note that Aspose.Pdf for .NET is PDF generation API and rendering of PDF depends upon the software/application displaying the file.

You may visit the following link for further details on Create JavaScript Link in Existing PDF File

Furthermore, before you purchase our API, you may consider requesting a 30 days temporary license to test our API without any limitations. For more information, please visit Get a temporary license


Thanks for providing the link regarding the Javascript. Will look into the functionality, and if we can achieve want we are looking for.

Regarding Aspose Licensing - my company has already purchased a license. It is currently providing us the solution we want. Thanks!

Thanks Nayyer! Will definitely look into the link, and see if it can provide the functionality we want.

Regarding the licensing - my company has already purchased a license.

Hi Troy,

Please try using our API’s and in case you encounter any issue or you have any further query, please feel free to contact.