Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am looking for a method that can keep track of how many times a PDF file is viewed and display the information in the PDF file itself.

Ex. suppose the file is viewed for the first time (the system or the operating system could decide what it defines as "being viewed for the first time"), the PDF file must have: "Welcome, you are viewing this for the first time". For the second time the pdf is being viewed, it must contain: "Hi, welcome again, this is the 2nd time you're opening this file". and so on.

Is this possible by maintaining a counter in LaTeX, which can be updated by the system. It could require the viewer to have Java enabled or some additional feature, which is fine. I am assuming Acrobat Reader has them.

Hope my question is clear.

share|improve this question
there are quite some problems involved in this. Very often PDF's are opened in restricted mode, which basically means that the user has to enable system calls, extra content etc. in the viewer. This makes the document annoying in the sense that if one does not add these settings per default, it will notify the user about the existence of additional material in the document which requires more access. Having said that, I would be very interested in an answer myself! :) – zeroth Mar 11 at 23:34
Your question has nothing to do with (La)TeX (and I'm pretty sure this is not feasible in a PDF document). I propose to close your question as off topic. – Paul Gaborit Mar 11 at 23:36
If you have an example of a PDF that can do this, please provide it. @PaulGaborit: Agreed, but if it can be done in a PDF, perhaps this question should be reopened. – Peter Grill Mar 12 at 0:04
1  
The question is only off-topic not a bad question. So doesn't deserve to be downvoted. – percusse Mar 12 at 0:41
I think the only limitation for doing this in PDF's is the same as doing it in a browser, IE, Firefox, etc. does NOT allow writing to arbitrary files via JavaScript (correct me if I'm wrong), however, my vision of a solution for this would be something along the lines of: tex.stackexchange.com/questions/56849/… which is fully included in the TeX file as well as incorporating JavaScript. In that regard, the question might very well be answered via TeX and JavaScript and thus be on-topic. Probably with the answer: No. (needs tests) – zeroth Mar 12 at 8:26
show 1 more comment

closed as off topic by Paul Gaborit, egreg, Kurt, Peter Grill, Matthew Leingang Mar 12 at 0:38

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.