Is it possible to get the "device id" to identify the user's PC/mobile phone with javascript in a PDF file?
I intend to send this device id to the server for simple authentication, after I open the file (sending to server is not an issue).
Is it possible to get the "device id" to identify the user's PC/mobile phone with javascript in a PDF file?
I intend to send this device id to the server for simple authentication, after I open the file (sending to server is not an issue).
Using Acrobat JavaScript (the JavaScript version for PDF), you will not be able to get the user ID or anything from the machine. And, as it has been said, only a few PDF viewers for mobile devices do support (Acrobat) JavaScript to some extent, and none of them (as far as I know) supports the identity object (that's where some user information is accessible).
However, there are severe restrictions on when some of the identity object's properties (such as user's login name) can be accessed. In fact, the only time is when the application (Acrobat) starts up. In order to make this information accessible to documents etc. you would have to install an application-level JavaScript which reads out the information and makes it available as global variables. This does require an active installation of the JavaScript at specific places. (and again, none of the mobile PDF viewers supports that).
In short, the answer is "no".
I answered this question or a similar question to it that should solve your problem, I wont post the code i will link the answer, if this is not what you need, please use comment.
The answer uses native js, you don't need jquery.