These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Page Extract on Form

polgas
Registered: Aug 25 2008
Posts: 4

Hi, I'm using Adobe 9 Pro and I have a form that has 3 pages. I've created a Submit button that will e-mail the form to a certain email address. What I'm trying to do is to submit just the page 2 of the form. I was able to do that by using the extract function but I believe thru reading some of the posts online that extraction cannot be done with a reader, right? So my question now is, is there any other way I could do the submission of just the page 2 of my form without using the extract function so that other people with just a reader can use my form?? I really appreciate all the suggestions or help that you guys could give me! Thanks so much in advance! ;)

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, use either the "doc.mailForm()" or "doc.submitForm()" fucntions. Both of these functions have an input for listing the fields you want to submit. There are plenty of posts on this forum dealing with these functions. Do a search and you'll find plenty of info.

There is also a non-programming way to do this. Create a button and add a "SubmitForm" action to the MouseUp event. In the dialog for setting up the submit, use a "mailto:" format for the URL and then select the fields that will be submitted.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

polgas
Registered: Aug 25 2008
Posts: 4
Hi thomp! Thanks so much for your reply, I really appreciate it. However, I did try all the solutions you gave me and they all worked but I need something else that will hide some of the pages in my form when a user tried to send just one page. I was thinking if: " this.print({nStart:1, nEnd:2}); " can be done also in doc.submitForm() and doc.mailForm() functions? Like it will look for the first page then the last page? I also tried this function:

var t =this.getTemplate("Page1");
t.hidden = true;

but didn't work for acrobat reader. Right now I have this:
this.submitForm({
cURL: "mailto:myemail [at] yahoo [dot] com",
cSubmitAs: "PDF",
cPage: "2"

});

I'm sure that cPage is not right because I've tried it and it didn't send the Page2, but do u have any other programming ideas that I could do something like this in order to send just a particular page?
I also tried doing the FDF:

this.submitForm({
cURL: "mailto:myemail [at] yahoo [dot] com",
cSubmitAs: "FDF"

});

This worked but when I opened the fdf email attachment it gave me this error:
"Acrobat is attempting to connect to http://intranet/forms/PCCPAPform.fdf
If you trust this site, choose Allow. If you do not trust the site, choose Block"

So if I choose Allow, the error was:
"Cannot find 'file:///C|/Documents and Settings/mara/local settings/temporary internet files/OLK12E/PCCPAPform.fdf. Make sure the path or Internet address is correct".
So I'm not really sure if I did something wrong with my coding.

I really hope you could give me another option and could help me with my coding. I really appreciate it! Thanks so much again!
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
So you want the user to be able to submit an actual page from the PDF?

It doesn't really work this way. You either submit the form data or the whole PDF. As you 've already found, there are functions that can be used to manipulate individual pages. For the most part these functions are for automating creating PDFs or workflows from a privileged environment. Not for general usage in form scripting. Templates can be used in Reader if the document has "Template" usage rights, which are only availible if you own one of the LC servers.

But take heart, there are a couple of solutions.
1. Separate out the form pages into individual PDFs and use them to create a Portofolio. A portfolio is just a fancy way of embedding documents in a PDF. Submitting from an embedded file is exactly the same as submitting from an idependant PDF. So you can submit individual pages this way.

2. Create a dynamic LiveCycle Form. In a dynamic LC form there aren't really pages. There are subforms that map into pages. So you can use code to hide and show subforms. This might work for you.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

polgas
Registered: Aug 25 2008
Posts: 4
Hi Thom,
I'm trying to use the LiveCycle form to create my pages right now.. It's harder than I thought.. In order to hide the subforms, can I use this code:

var t =this.getTemplate("Page1");
t.hidden = true;

and then I have to save the form as dynamic form instead of static form, right? I'm still on the process of redoing the entire form so I didn't do any of the testing yet. But do u think the 'hidden' script will work for adobe reader? My concern with my form right now is that, some of our users doesn't have the full blown acrobat, they only have readers. So that is why I have to make my form reader-enable, too. And I'm not sure if there's any way I could do that. Thank you so much for all your help! I really appreciate it.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The "getTemplate" fucntion is only for AcroForms that have page templates. It is not for LiveCycle Forms. To learn about hiding and showing subforms in a LiveCycle form, please watch this video.

https://admin.adobe.acrobat.com/_a200985228/p87746471/

Since you have Acrobat 9 Pro, you can apply the rights enabling you need. Look in the Advanced menu

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script