<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using URL Requests in PDF Forms</title>
	<atom:link href="http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Thu, 19 Jan 2012 16:32:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6042</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Fri, 10 Sep 2010 11:38:58 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6042</guid>
		<description>@Gerald Clerc,

Opening the PDF in a browser is the only way this feature will work. What URL are you using?</description>
		<content:encoded><![CDATA[<p>@Gerald Clerc,</p>
<p>Opening the PDF in a browser is the only way this feature will work. What URL are you using?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerald Clerc</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6041</link>
		<dc:creator>Gerald Clerc</dc:creator>
		<pubDate>Fri, 27 Aug 2010 14:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6041</guid>
		<description>Hi Stefan

I tried your sample, but nRequestStart = sURL.indexOf(&quot;?&quot;)
returns -1.
Is there a problem when the PDF is opened on Web?
Thanks for help
Gerald</description>
		<content:encoded><![CDATA[<p>Hi Stefan</p>
<p>I tried your sample, but nRequestStart = sURL.indexOf(&#8220;?&#8221;)<br />
returns -1.<br />
Is there a problem when the PDF is opened on Web?<br />
Thanks for help<br />
Gerald</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6040</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Wed, 03 Mar 2010 03:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6040</guid>
		<description>Ken,

I believe event.target.&lt;a href=&quot;http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.427.html&quot; rel=&quot;nofollow&quot;&gt;URL&lt;/a&gt; will return a URL that begins with &quot;file:///&quot; if the PDF is locally.

Perhaps simply checking the URL for &quot;file:&quot; instead of &quot;http:&quot; would give you the information you need.</description>
		<content:encoded><![CDATA[<p>Ken,</p>
<p>I believe event.target.<a href="http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.427.html" rel="nofollow">URL</a> will return a URL that begins with &#8220;file:///&#8221; if the PDF is locally.</p>
<p>Perhaps simply checking the URL for &#8220;file:&#8221; instead of &#8220;http:&#8221; would give you the information you need.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6039</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Sun, 21 Feb 2010 15:47:23 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6039</guid>
		<description>Regarding the security popup caused by event.target.URL.

Is there a way to find out if the PDF is opened from a website or on someone&#039;s computer?

Or maybe find out if the PDF has been saved?

Basically what I was thinking was finding a way to only execute the javascript code IF the PDF is viewed online and not yet saved.

So that we would only use the event.target.URL only if the PDF is viewed online and not local, if it&#039;s viewed locally don&#039;t run the code.

Any ideas?</description>
		<content:encoded><![CDATA[<p>Regarding the security popup caused by event.target.URL.</p>
<p>Is there a way to find out if the PDF is opened from a website or on someone&#8217;s computer?</p>
<p>Or maybe find out if the PDF has been saved?</p>
<p>Basically what I was thinking was finding a way to only execute the javascript code IF the PDF is viewed online and not yet saved.</p>
<p>So that we would only use the event.target.URL only if the PDF is viewed online and not local, if it&#8217;s viewed locally don&#8217;t run the code.</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6038</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Mon, 14 Dec 2009 18:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6038</guid>
		<description>Melissa,

My sample PDF is an XFA form. The only way you wouldn&#039;t be able to open it to see the script is if you aren&#039;t using Designer...

In any case, here&#039;s the parsing code. I hope it helps!

&lt;pre&gt;&lt;code&gt;// Requests:
// message &gt;&gt; The message to display, URI-encoded
// color &gt;&gt; RGB value &quot;R,G,B&quot; to set on the message

// start by clearing the values first
this.ui.oneOfChild.border.fill.presence = &quot;hidden&quot;;
this.rawValue = null;

var sURL = event.target.URL; // URL used to access this PDF form
var nRequestStart = sURL.indexOf(&quot;?&quot;);

// show the URL
URL.rawValue = sURL;

if (nRequestStart &gt; 0) // must be larger than zero or else this is a weird URL!
{
    var sRequest = sURL.substr(nRequestStart + 1);

    // show the request
    Request.rawValue = sRequest;

    var aRequests = sRequest.split(&quot;&amp;&quot;); // 1 request per array element

    for (var i = 0; i &lt; aRequests.length; i++)
    {
        var aNameValue = aRequests[i].split(&quot;=&quot;); // name=value
        var sName = aNameValue[0];
        var sValue = &quot;&quot;;

        try
        {
            // attempt to decode the various URI encodings (regular and component)
            sValue = decodeURI(decodeURIComponent(aNameValue[1]));
        }
        catch (e)
        {
            // invalid URI encoding found -- skip
            continue;
        }

        if (sName == &quot;message&quot;)
        {
            // show message value in text field
            this.rawValue = sValue;
        }
        else if (sName == &quot;color&quot;)
        {
            // expecting RGB value: &quot;R,G,B&quot;
            this.ui.oneOfChild.border.fill.color.value = sValue;
            this.ui.oneOfChild.border.fill.presence = &quot;visible&quot;;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Melissa,</p>
<p>My sample PDF is an XFA form. The only way you wouldn&#8217;t be able to open it to see the script is if you aren&#8217;t using Designer&#8230;</p>
<p>In any case, here&#8217;s the parsing code. I hope it helps!</p>
<pre><code>// Requests:
// message &gt;&gt; The message to display, URI-encoded
// color &gt;&gt; RGB value "R,G,B" to set on the message

// start by clearing the values first
this.ui.oneOfChild.border.fill.presence = "hidden";
this.rawValue = null;

var sURL = event.target.URL; // URL used to access this PDF form
var nRequestStart = sURL.indexOf("?");

// show the URL
URL.rawValue = sURL;

if (nRequestStart &gt; 0) // must be larger than zero or else this is a weird URL!
{
    var sRequest = sURL.substr(nRequestStart + 1);

    // show the request
    Request.rawValue = sRequest;

    var aRequests = sRequest.split("&amp;"); // 1 request per array element

    for (var i = 0; i &lt; aRequests.length; i++)
    {
        var aNameValue = aRequests[i].split("="); // name=value
        var sName = aNameValue[0];
        var sValue = "";

        try
        {
            // attempt to decode the various URI encodings (regular and component)
            sValue = decodeURI(decodeURIComponent(aNameValue[1]));
        }
        catch (e)
        {
            // invalid URI encoding found -- skip
            continue;
        }

        if (sName == "message")
        {
            // show message value in text field
            this.rawValue = sValue;
        }
        else if (sName == "color")
        {
            // expecting RGB value: "R,G,B"
            this.ui.oneOfChild.border.fill.color.value = sValue;
            this.ui.oneOfChild.border.fill.presence = "visible";
        }
    }
}</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Melissa</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6037</link>
		<dc:creator>Melissa</dc:creator>
		<pubDate>Wed, 09 Dec 2009 13:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6037</guid>
		<description>what i really need for the completion of your tutorial on the pass var via url to pdf field is the parsing code that goes in the pdf itself. I&#039;ve tried to access it via the URLRequest.pdf but since its an older version I cant get the appropriat javascript from that doc. if you can send the code it would really help with a project i am on.</description>
		<content:encoded><![CDATA[<p>what i really need for the completion of your tutorial on the pass var via url to pdf field is the parsing code that goes in the pdf itself. I&#8217;ve tried to access it via the URLRequest.pdf but since its an older version I cant get the appropriat javascript from that doc. if you can send the code it would really help with a project i am on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James H.</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6036</link>
		<dc:creator>James H.</dc:creator>
		<pubDate>Wed, 04 Nov 2009 21:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6036</guid>
		<description>I think I found the issue with my above post.  After you open the form, you need to manually type something into one of the other fields before saving.

James H.</description>
		<content:encoded><![CDATA[<p>I think I found the issue with my above post.  After you open the form, you need to manually type something into one of the other fields before saving.</p>
<p>James H.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James H.</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6035</link>
		<dc:creator>James H.</dc:creator>
		<pubDate>Tue, 03 Nov 2009 23:52:10 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6035</guid>
		<description>Hey Stefan,

Can you save a document with data that is imported via the URL?  I woud like the users to get 1/2 of the data via the URL, enter the other 1/2 and be able to save their PDF locally.

I took your sample PDF document and commented out the two lines of code that clear the values:
this.ui.oneOfChild.border.fill.presence = &quot;hidden&quot;;
this.rawValue = null;

But, after I save the document and re-open it, the values are gone.

Thanks,

James H.</description>
		<content:encoded><![CDATA[<p>Hey Stefan,</p>
<p>Can you save a document with data that is imported via the URL?  I woud like the users to get 1/2 of the data via the URL, enter the other 1/2 and be able to save their PDF locally.</p>
<p>I took your sample PDF document and commented out the two lines of code that clear the values:<br />
this.ui.oneOfChild.border.fill.presence = &#8220;hidden&#8221;;<br />
this.rawValue = null;</p>
<p>But, after I save the document and re-open it, the values are gone.</p>
<p>Thanks,</p>
<p>James H.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6034</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Sun, 19 Oct 2008 18:35:41 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6034</guid>
		<description>Dan,

I&#039;m glad you liked my post. You&#039;ll need &lt;a href=&quot;http://www.adobe.com/products/livecycle/designer/&quot; rel=&quot;nofollow&quot;&gt;Adobe LiveCycle Designer&lt;/a&gt; to open this form and look at the code inside. You can get a trial version of Designer by downloading the &lt;a href=&quot;http://www.adobe.com/products/acrobatpro/tryout.html&quot; rel=&quot;nofollow&quot;&gt;trial version of Acrobat Pro&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>I&#8217;m glad you liked my post. You&#8217;ll need <a href="http://www.adobe.com/products/livecycle/designer/" rel="nofollow">Adobe LiveCycle Designer</a> to open this form and look at the code inside. You can get a trial version of Designer by downloading the <a href="http://www.adobe.com/products/acrobatpro/tryout.html" rel="nofollow">trial version of Acrobat Pro</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://forms.stefcameron.com/2006/10/20/using-url-requests-in-pdf-forms/#comment-6033</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 14 Oct 2008 23:33:58 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=49#comment-6033</guid>
		<description>I love your post, but I&#039;m having a ton of trouble with implementation.  I tried editing your pdf in Acrobat 8, but I can&#039;t modify the layout or look at the field parameters.  Could you please publish a version that I can open and edit?  I&#039;m new to javascript and PDF&#039;s so maybe what I need is a codeblock that I can tie to an action or set in the defaults for the field.  Really, I don&#039;t even know where to begin.  Thanks for any input you can provide.  Getting this going will solve a major problem we&#039;re having.

Best,
Dan</description>
		<content:encoded><![CDATA[<p>I love your post, but I&#8217;m having a ton of trouble with implementation.  I tried editing your pdf in Acrobat 8, but I can&#8217;t modify the layout or look at the field parameters.  Could you please publish a version that I can open and edit?  I&#8217;m new to javascript and PDF&#8217;s so maybe what I need is a codeblock that I can tie to an action or set in the defaults for the field.  Really, I don&#8217;t even know where to begin.  Thanks for any input you can provide.  Getting this going will solve a major problem we&#8217;re having.</p>
<p>Best,<br />
Dan</p>
]]></content:encoded>
	</item>
</channel>
</rss>

