Hi, Is it possible to add some code is PDF to build some kind of tracking system, every time PDF opens a particular url will get hit.
I was trying JavaScript Action but only alerts are working not the Ajax request.
Document doc = new Document("D:\\1.pdf");
//Below line not working
doc.Pages[1].Actions.OnOpen = new JavascriptAction("var xhttp = new XMLHttpRequest(); xhttp.open('GET', 'http://example.com/track?id=4', true); xhttp.send();");
//Close one is working
doc.Pages[1].Actions.OnClose = new JavascriptAction("app.alert('close')");
doc.Save("D:\\11.pdf");
Thanks,
Pawan