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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FDF Data Merging causes Submit Button problem 1

Status
Not open for further replies.

Steve101

Programmer
Mar 29, 2002
1,473
AU
I have a PDF form with has an Import, Reset and Submit button on it. From within a browser, I can operate these three buttons correctly. The Import button triggers an ASP file with an associated FPF definition, and all works fine.

What I want to do is have the PDF file open with the appropriate data already imported.

No problem I thought.

I replaced the <a href="FormTest.pdf"> HTML code with
<a href="FormTest.fdf"> and again this seemed to work a treat.

The problem however comes when I attemtp to press the Submit button on the displayed PDF form. It now comes up with the error: "File Not Found: URL FormTestSubmit.asp". This has me totally baffled as neither the PDF or the FDF file have been changed. The URL has simply been directed to the FDF file instead of the PDF.

I simply want to be able to load the PDF form with database sourced variables; I am 90% there, but have run into this problem. Any help would be appreciated.

I also tried adding some command line options to the URL; eg. tried:

<a href="FormTest.pdf#fdf=FormTest.fdf"> but this didnt work either.

Can anyone help with the resolution of this,

Thanks in advance,





Steve Lewy
Solutions Developer
(dont cut corners or you'll go round in circles)
 
Thanks Tom;

I did have the FDF / PDF merging bit working though. I seem to have a problem with a submit button on the PDF form. It works fine if the PDF is called directly from a link on an ASP web page, but doesnt find the link on the button if the same PDF is loaded via the FDF file. In the above scenario, I have all ASP, PDF and FDF files in the same folder, and the ASP filename nominated as the buttons URL is unqualified.

If I qualify the Submit button's URL, then the button works when the PDF is called via the FDF but the ASP page's responses are returned within the PDF, and not witnin the browser window. Weird stuff.

This may be related ... I have an early version of Acrobat Writer installed (4.x), plus a later reader. Im not sure of the version of the browser add in. Could the problem be that this is version is too old?

Any further input you can provide would be appreciated,

Cheers,


Steve Lewy
Solutions Developer
(dont cut corners or you'll go round in circles)
 
You must fully qualify the URL. Whether or not links load within Acrobat vs. Web Browser is a setting in Acrobat.

Thomas D. Greer
 
Tom,

The URL qualification does the trick (many thanks). However when I load via the FDF, the submit button load its link into page 2 of the same document; when I load the PDF direct, the submit button loads its link (correctly) into the browser.

I have checked the Acrobat (V4) preferences, and am unsure of how to control this apparent inconsistency. Could it be Version 4 which is the problem. Could you be a little more explicit in explaining how it is controlled within Acrobat; have tried various preferences without success.

Cheers,


Steve Lewy
Solutions Developer
(dont cut corners or you'll go round in circles)
 
Well, I was purposefully vague because I don't recall the exact steps in Acrobat 4. If you right-click a hyperlink in a PDF document, does it present you with a context-menu of options?



Thomas D. Greer
 
Tom,

I seem to have cracked it by opening the PDF file from the Submit button and adding the following PageAction Javascript to the PDF:

this.importAnFDF("C:\\MyPath\\MyFile.fdf")

Doesnt seem to like a virtual URL name like:

this.importAnFDF("
so hopefully that wont present a problem later in a production environment.

The only other problem is that with the PageAction event, it can get triggered multiple times in a multipage document if the page is returned too, so I guess I'll have to figure using a local variable to control this, unless there's a more elegant Document level event that can be used to ensure that the code is only triggered once.

At any rate, many thanks for your assistance,




Steve Lewy
Solutions Developer
(dont cut corners or you'll go round in circles)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top