Hello,
You can use it as an external graphic resource, and
specify the desired pages with the FusionProResource.pagenumber
property. If you using inline graphics in a text frame with overflow
pages, you can insert a variable number of pages for each output record.
Here are the steps to take to accomplish this:
* Start with a new input PDF document. (You can start from a blank
one-page document by saving or printing a blank document to PDF from
another application.) The page size should be the same as in the PDF
from which you are including the pages.
* Define the data source for the document. (You can import from your
original input PDF.)
* Set a text frame that completely covers the page, starting at X and Y
of zero. You may need to extend the width and depth of the page by a
bit.
* Insert an Overflow page, duplicating the existing Body page. Set the
text frame as the overflow destination. (Check the "Overflow To" box on
the Text Frame palette.)
* Create a Text rule like the one below. Make sure to check the "Treat
returned strings as tagged text" box.
* Edit the text of the frame on the Body page to include the rule
variable. Set the point size of the variable to 1.
* Set the Overflow options for the Body page to overflow to your
Overflow page (in the "New Left Page" drop list). Leave "New Right
Page" as "(None)" and set the add page mode to "As Few Added Pages As
Possible."
Here is an example of the kind of rule you need:
// MODIFY THESE TO MATCH YOUR DATA
var PDFResourceFile = "myfile.pdf";
var FirstPageNumber = Int(Field("firstpagenumber"));
var FirstPageCount = Int(Field("firstrepeatcount"));
var SecondPageNumber = Int(Field("secondpagenumber"));
var SecondPageCount = Int(Field("secondpagecount"));
var result = "";
var pdf = new FusionProResource(PDFResourceFile, "graphic");
pdf.pagenumber = FirstPageNumber;
for (var i = 1; i <= FirstPageCount; i++)
result += pdf.content + "\n";
pdf.pagenumber = SecondPageNumber;
for (var i = 1; i <= SecondPageCount; i++)
result += pdf.content + "\n";
return result;
This assumes that you have data fields specifying the page numbers and
repeat counts for each. You may have to play around a bit with the size
of the frames, but this should work.
HTH
Alex
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2008 9:47 AM
To: FusionPro Users Forum
Subject: [fusionpro] Return ALL pages of a PDF of unknown length
I have a DVD that contains lots of pdfs of varying pagecounts.
I'm trying to create a text rule that will create a graphic resource from a
field, place it inline in a text frame, and overflow it accordingly with the
number of pages in the particular pdf.
This is as close as I've come, but it only returns the first page of the pdf.
I've tried looking for a couple of days for answers, but the knowledge base is
down and I've hit a wall. Any help is appreciated.
var pathName = "";
var x = new FusionProResource (pathName + (Field("PathFile")), "graphic");
var pdfString = '';
for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++)
{
x.pagenumber = pgnbr;
pdfString += x.value;
}
return pdfString;
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!
Variable text on a curve and soft drop-shadows for variable text
LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade
New licenses available for $599 each at:
http://fusionpro.printable.com/store/
All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
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
--
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!
Variable text on a curve and soft drop-shadows for variable text
LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade
New licenses available for $599 each at:
http://fusionpro.printable.com/store/
All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
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
--