Hi all,
I am currently trying to create a program that would auto populate the form fields in a PDF file. I found the following code online at 15 seconds.com. The code doesn't throw any error but it does not produce the intended result. It is suppose to retrive the data submitted from a form and populate the PDF file with the data. But when I run the script all it does is open the PDF file with no information filled in. Please help! Thanks!
I am currently trying to create a program that would auto populate the form fields in a PDF file. I found the following code online at 15 seconds.com. The code doesn't throw any error but it does not produce the intended result. It is suppose to retrive the data submitted from a form and populate the PDF file with the data. But when I run the script all it does is open the PDF file with no information filled in. Please help! Thanks!
Code:
<%@ LANGUAGE = VBScript%>
<%
Option Explicit
Dim strFirstName '-- First Name value for the txtFirstName field
Dim strProgTitle '-- Program Language(s) most familiar w/ Title for
strFirstName = "Eric"
strProgTitle = "chkVBS"
%>
<% Response.ContentType = "application/vnd.fdf" %>
%FDF-1.2
1 0 obj
<<
/FDF
<<
/Fields
[
<<
/T (txtFirstName)
/V (Eric)
>>
<<
/T (txtExperience)
/V (DHTML)
>>
<<
/T (chkVBS)
/V (Yes)
>>
<<
/T (radGender)
/V (Male)
>>
<<
/T (selSite)
/V (microsoft.com)
>>
<<
/T (selColor)
/Opt [(#6699FF) (#0000CC) (#990033) (#000080) (#FFCC00)]
/V (#000080)
>>
]
/F ([URL unfurl="true"]http://www.testtest/FormTest.pdf)[/URL]
>>
>>
endobj
trailer
<<
/Root 1 0 R
>>
%%EOF