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

Script for extracting pages in LiveCycle - HELP !!!

rodbunn
Registered: Feb 3 2008
Posts: 81

I paid Adobe $1200 for them to tell me this works to extract pages in LiveCYcle BUT I can't get it to work;

var myDoc = event.target;
myDoc.extractPages(nStart, nEnd, cPath);

Can ANYONE help me out ??? I told Adobe this didn't work and they refuse to help me out (even though they didn't have any trouble taking my $1200).

THey said to put this on the "click" event, which I did. They also said if I left
off the cPath, Adobe would prompt me for the path....

PLEASE Anyone, I really need this function !

Thanks in advance,

Rod
rodbunn [at] yahoo [dot] com

My Product Information:
LiveCycle Designer, Windows
Lindy
Registered: Jul 17 2007
Posts: 30
What version of LiveCycle are you using?
What message(s) are you getting?

I set the click event of a button to 'JavaScript' and ran this code:

var myDoc = event.target;
myDoc.extractPages();

Also
var myDoc = event.target;
myDoc.extractPages(1, 1);

Works well. What happens when you try?
rodbunn
Registered: Feb 3 2008
Posts: 81
LiveCycle 8.0 I don't get a message, it just doesn't do anthing.... just acts like nothing happened..... I cut and pasted what you have and nothing!

How can I tell if there is an "error" ?

Thanks, Rod
Lindy
Registered: Jul 17 2007
Posts: 30
Prior to clicking the button, press Ctrl + J on the keyboard. This will open the JavaScript debugger window.
With the debugger open, click your button - see if any messages appear.
rodbunn
Registered: Feb 3 2008
Posts: 81
I got this:
NotAllowedError: Security settings prevent access to this property or method.
Doc.extractPages:2:XFA:form1[0]:InputSubform1[0]:PrintSubForm[0]:Email5[0]:click
Lindy
Registered: Jul 17 2007
Posts: 30
What happens if you have the document open in Acrobat and select "Document - Extract Pages" from the Menu Bar?
rodbunn
Registered: Feb 3 2008
Posts: 81
It doesn't let me have that coice, it's not lit-up.
rodbunn
Registered: Feb 3 2008
Posts: 81
Under security it says "Page extraction not allowed"...
I don't know where that came from.
Lindy
Registered: Jul 17 2007
Posts: 30
What is the overall security setting for this document?
There are options that prevent extracting. It would appear that that option is in effect.
In Acrobat, open the document.
Click "File - Properties", then the"Security" tab.
This will provide a listing of what is and is not allowed on this document.
rodbunn
Registered: Feb 3 2008
Posts: 81
That's what I did and it said: "Page extraction not allowed"....
I don't know where that came from, I didnt set any security.....
Lindy
Registered: Jul 17 2007
Posts: 30
Is there a password required to open this document in either Acrobat or LiveCycle?
What does the top portion of the Security tab window say as far as "Security Method:"?
rodbunn
Registered: Feb 3 2008
Posts: 81
Is says "No Security".... I opened the original file before I Enabled Usage Rights and it says Page Extraction Allowed. I opened the file after I Enabled Usage Rights and it says Not ALlowed... Does that have an affect on the security?
rodbunn
Registered: Feb 3 2008
Posts: 81
I created a blank page with one button and I get the same error, "not allowed". There is no seurity set. Something is making it not allow extracting pages.....
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You may have to save the file as a PDF and open it in Acrobat not "Preview" in LiveCycle Designer.

Here is a link to Acrobat's JavaScript API. http://www.adobe.com/devnet/acrobat/javascript.php

This method for Reader will also require Extedned Form Rights be applied to the PDF.

George Kaiser

rodbunn
Registered: Feb 3 2008
Posts: 81
That is NOT what Adobe says (for $1200) and the other person above said it worked.....
Lindy
Registered: Jul 17 2007
Posts: 30
I can replicate what you are experiencing, but I don't have an answer.
I have not run into this in my work.

You will need help from someone with more background than I have.

Sorry to not be more help.
Lindy
Registered: Jul 17 2007
Posts: 30
Take a look at this thread:
http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=1709