We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    I’m looking for the best way of achieving this scenario:

    1. Link to restricted pdf (could be html doc if necessary), if logged in go to pdf, if not sent to registration page. Done
    2. Registered web user opens pdf file, client receives auto email stating which user visited which pdf.

    All I’ve got so far with 2. is that the user ID and DocID etc should be available, but how could I generate an email?
    Would using a plug-in for OnLoadWebDocument be feasible?
    Any help, advice or code guidance would be appreciated.
    Might be of limited use to the community!

    David
      • 10449
      • 956 Posts
      You can only log who is downloading (requesting) a certain file. Whether they’re actually opening it in Adobe Acrobat Reader, is beyond your control. You would have to dynamically create each PDF and insert some Adobe-proprietary Javascript into these files, which trigger an email or server-request. I’m pretty sure this is not what you - or any user - wants. There is probably not even an appropriate JS event available for this. Firewalls and antivirus apps will likely trigger all sorts of alarms...

      The only workable solution imo would be a download link via PHP. Log the request (database-update and/or email), then send out download headers for the correct file.

      There was a similar forum thread just 1-2 days ago, where I posted a basic code example...