Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP & FDF 2

Status
Not open for further replies.

chappi

Technical User
Aug 29, 2001
42
0
0
US
Hello,

I am trying to pre-fill an existing PDF file with form data process by an ASP file. Everything seems to work just fine until the file is supposed to be written to the screen. I then get a message saying that the file is damaged and cannot be repaired.

Here is my code to process the form data:

Code:
	'create pdf
	set fdfAcx = server.createobject("FdfApp.FdfApp")

	dim myFDF
	set myFDF = fdfAcx.FDFCreate

	myFDF.FDFSetFile "[URL unfurl="true"]http://localhost/exxon_initial.pdf"[/URL]
	myFDF.FDFSetTargetFrame "AW_body"

	empName = employee_name
	svName = supervisor_name
	compDate = Date()
	comDate2 = Date()

	myFDF.FDFSetValue "empName", empName, Off
	myFDF.FDFSetValue "svName", svName, Off
	myFDF.FDFSetValue "compDate", compDate, Off
	myFDF.FDFSetValue "comDate2", comDate2, Off

	myFDF.FDFSetStatus "Your Certificate has been created."

	response.contenttype = "application/vnd.fdf"
	response.binarywrite myFDF.FDFSaveToBuf

	myFDF.FDFclose

	set myFDF = nothing
	set fdfAcx = nothing

I was able to open the PDF file manually and it worked just great.

I am wondering if anyone else has come across this and if/how they were able to fix this.

Thanks so much.
J~
 
is that complete code for the page...do you have any other additional HTML code or anything else...

Leave out the HTML content when posting FDF data throughout the entire asp. Response.BinaryWrite can not write more than one content type per response, so leave out HTML code.

-DNG
 
Ha, that is awesome. Thanks so much, that was it!

Thanks!

J~ :)
 
Chappi,

BTW, could you tell me how is this planet pdf software...i have never used it to the full extent..only used the demo model once...now i am also working on the asppdf demo version from persists software...

do you have any opinion on which is good...

thanks

-DNG
 
Well actually, I used neither. I installed the Adobe FDF Toolkit. You can download it from Adobe's Developer Network website and it needs to be installed as a DLL on the webserver to run. Works great now :)
 
thanks. may be i should work more on them to figure out which is good :)

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top