Dan and David,
I appreciate all your input on this matter so far and I think we are almost
there. Here is where I am at and the results achieved thus far using first
David's initial rule he sent me a few emails back and then second using Dan
Korn's revised version of David's alternate rule:
-----------------------------------------------------------------------
1. Davids initial rule he sent me a couple emails back:
var x = new FusionProResource(pathName + "MyFile.pdf", "graphic"); x.name =
(pathName + "MyFile.pdf"); var pdfString = ''; var pgnbr = 1;
while (pgnbr < 10)
{
x.pagenumber = pgnbr;
if (x.exists){
pdfString += x.value;
}
else {
break;
}
}
After creating this in "Edit rules" when I click "validate" I get the
multicolored spinning wheel and it jams up acrobat so I have to force quit.
What element in this rule is making acrobat think so hard?
---------------------------------------------------------------------------
2. Dan Korn's revised version of David's alternative Rule - the results
were closer but still not quite there...
var x = new FusionProResource(pathName + "MyFile.pdf", "graphic");
var pdfString = '';
for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++)
{
x.pagenumber = pgnbr;
pdfString += x.content;
}
return pdfString;
The first time I did this the return that I got was the word "undefined"
repeated as many times as there were pages in the pdf that I was referencing
(tried two different files). Also when I composed I got this error message
"Check for file existence and that it is of proper format". I then moved
the file to a different folder and referenced it there and this time the
return was blank with no "undefined" message, though when I composed I still
got the "Check for file existence and that is of proper format" message.
The files I used were regular PDF's 1 and 3 pages and I am using Acrobat 7.
Dan Parisen
J&M Reproduction
-----Original Message-----
From: Dan Korn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08, 2007 1:19 PM
To: FusionPro Users Forum
Subject: [fusionpro] RE: Multiple Page file template question
David Sweet wrote:
var pLimit = x.length; //this is not correct
Try this instead:
var pLimit = x.countPages;
The properties of the FusionProResource object are listed in the
Building Blocks dialog, "JS Language" tab, Objects node.
Also, your "while" loop as written will be an endless loop if you don't
increment the counter variable. It might be better to use a "for" loop,
like so:
var x = new FusionProResource(pathName + "MyFile.pdf", "graphic");
var pdfString = '';
for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++)
{
x.pagenumber = pgnbr;
pdfString += x.content;
}
return pdfString;
Note that the FusionProResource.value property is deprecated; the
content property should be used instead.
Finally, you don't need to explicitly set the name property of the
FusionProResource object. That's done implicitly when it's created.
Dan
--
Users of FusionPro Desktop have unlimited free email support. Contact
Printable Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm
--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--
--
Note: All e-mail sent to or from this address will be received or otherwise
recorded by the e-mail recipients of this forum. It is subject to archival,
monitoring or review by, and/or disclosure to someone other than the
recipient. Our privacy policy is posted on www.printplanet.com
--
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm
--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--
--
Note: All e-mail sent to or from this address will be received or otherwise
recorded by the e-mail recipients of this forum. It is subject to archival,
monitoring or review by, and/or disclosure to someone other than the recipient.
Our privacy policy is posted on www.printplanet.com
--