[pdftex] Net.HTTP and pdflatex

Raphaël Pinson raphink at gmail.com
Mon Jan 24 18:43:23 CET 2011


Hello,

I'm trying to use Net.HTTP with insDLJS to produce a PDF document
which performs an HTTP request.


The code I'm using is:

\usepackage[pdftex]{insdljs}

\begin{insDLJS}[UpdateVersion]{UpdateVersion}{Document Level JavaScript}
function UpdateVersion() {
var params = {
 cVerb: "GET",
 cURL: "http://site.tld/path" };
var newversion = Net.HTTP.request(params).response();
var version = "1.3";
if (newversion > version) {
  app.alert("A new version of this document is available");
}
}
\end{insDLJS}

\OpenAction{/S /JavaScript /JS ( UpdateVersion(); ) }


When I open the PDF document in Acrobat Reader with JavaScript console
activated, I get the following message (translated from French):

NotAllowedError: The protection parameters forbid access to this
property or method.
Net.HTTP.request:5:Page undefined:Open

I've searched in quite a few places already, but I couldn't solve
this. Is there a way to activate this permission in a LaTeX file using
pdflatex?


Raphaël



More information about the pdftex mailing list