tags:

views:

219

answers:

4

I have a daily cron job that email PDFs to customers. I want to get a measure of how many of those PDF files are opened. What techniques are available?

The standard technique in a web page is to include an img tag with a src reference to a server endpoint that records the ping. But it seems that PDF doesn't allow external image references.

Is there some way to accomplish what I want?

Update: we're considering having the email carry a link to the PDF, but there are reasons we don't want to, so I'm interested to hear other options.

+1  A: 

You could have the email link to the pdf itself, and use that as the ping you are looking for.

Matthew Vines
+2  A: 

To "call home" you would need a Adobe LiveCycle Policy Server.

Otherwise, if there's a way to embed an external image, that might work for logging purposes, but I don't think that's possible...

Edit, there might be a few methods, including AcroJS. Haven't tested them myself, so I've no idea if they're any good.

Edit 2: As a Linux user, I should point out that both of these non-standard approaches won't work for non Acrobat Reader users.

Oli
+2  A: 

Perhaps you could take a slightly different approach - have your cron job make the PDF(s) available on a web server somewhere, and then send e-mails including a link to the PDF. That would make it very easy to check how many are actually viewed, from the web server logs.

You've probably already thought of this and discounted it though ;)

Martin McNulty
+1  A: 

You can take a look at the Adobe Acrobat JavaScript reference http://www.adobe.com/devnet/acrobat/javascript.html. You can use some Ajax inside your PDF document, this document is especially a good reference.

Add some JavaScript to your PDF document and listen for the Doc Open event then (assuming your user are using Adobe Reader version 8 or later) use the Net.SOAP.request method to make a remote procedure call to your service. I haven't tried this before, I only used PDF javascript to post Form result to web services, but I believe that before connecting Adobe Reader will prompt the user to let them an internet connection is being requested.

Emmanuel