One day I will, but I thought, that I've already joined the forum even though I'm not registered yet, because I don't only use it (this particular question is only third, that I've posted so far), but also contribute to it, posting my solutions to somebody's problems.
As for this file that I keep bothering you with, I did create it in the
wwwroot directory on my computer, where I'm running PWS on NT4.
I added appropriate MIME-type through IIS Management Console to server's settings.
System recognizes .pdf and .fdf files, created by Adobe Acrobat beatifully.
But whenever I try to open it from browser I'm getting the error.
If I go to any website, which has .pdf files and click on one of them, I can see, that Acrobat Reader launches and .pdf document replaces current document in the browser's window. Even a part of Acrobat's tool bar appears underneath navigation bar of the browser.
So, I really don't know whether it's permissions or not.
Maybe it has something to with PWS, which doesn't allow out-of-process components to run from it?
But what about .pdf files on the Web that I can open?...
And components? You said, that I need to acquire some to generate .pdf files, and I just wanted to find out if know any of them.
Here's the code, which actually creates a file and contains a link to it, but whenever I click on it -- error occurs.
<%@ Language=VBScript %>
<% Response.Buffer = true%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<%
'
' Retrieve the user responses
'
FirstName = Request.form("txtFirstName"
MI = Request.form("txtMI"
LastName = Request.form("txtLastName"
SS1 = Request.form("txtSocial1"
SS2 = Request.form("txtSocial2"
SS3 = Request.form("txtSocial3"
StreetAddress = Request.form("txtStreetAddress"
City = Request.form("txtCity"
State = Request.form("txtState"
Zip = Request.form("txtZip"
FilingStatus = Request.form("radFilingStatus"
Allowances = Request.form("txtAllowances"
Additional = Request.form("txtAdditional"
Exempt = Request.form("chkExempt"
If Exempt = "on" Then
Exempt = "EXEMPT"
Else
Exempt = ""
End If
'
' Create an instance of the Object
'
Set FdfAcx = Server.CreateObject("FdfApp.FdfApp"
'
' Use the fdfApp to feed the vars
'
Set myFdf = FdfAcx.FDFCreate
'
' Stuff the variables
'
myFdf.fdfsetvalue "FirstName", FirstName, false
myFdf.fdfsetvalue "MI", MI, false
myFdf.fdfsetvalue "LastName", LastName, false
myFdf.fdfsetvalue "SS1", SS1, false
myFdf.fdfsetvalue "SS2", SS2, false
myFdf.fdfsetvalue "SS3", SS3, false
myFdf.fdfsetvalue "StreetAddress", StreetAddress, false
myFdf.fdfsetvalue "City", City, false
myFdf.fdfsetvalue "State", State, false
myFdf.fdfsetvalue "Zip", Zip, false
If FilingStatus = 1 Then
MyFdf.fdfsetValue "StatusSingle", "X", false
End If
If FilingStatus = 2 Then
MyFdf.fdfsetValue "StatusMarried", "X", false
End If
If FilingStatus = 3 Then
MyFdf.fdfsetValue "MarriedBut", "X", false
End If
myFdf.fdfsetvalue "Allowances", Allowances, false
myFdf.fdfsetvalue "Additional", Additional, false
myFdf.fdfsetvalue "Exempt", Exempt, false
'
' Point to your pdf file
'
myFDF.fdfSetFile "w4.pdf"
Response.ContentType = "text/html"
'
' Save it to a file. If you were going to save the actual file past the point of printing
' You would want to create a naming convention (perhaps using social in the name)
' Have to use the physical path so you may need to incorporate Server.mapPath in
' on this portion.
'
myFDf.FDFSaveToFile "D:\inetpub\' Now put a link to the file on your page.
Response.Write "<a href='
' Close your Objects
'
myfdf.fdfclose
set fdfacx = nothing
%>
</body>
</html>
Thank you for your time