Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Creator

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 20th, 2015, 08:47 AM
INGuser INGuser is offline
Junior Community Member
 
Join Date: Feb 2010
Location: Des Moines, IA
Posts: 41
Default Variable Pages

Good Morning,

I am wondering if there is a way to insert a specific number of pages behind my cover page with out adding 492 template pages and writing a rule for each page usage. I have attached my collected files.

I have a cover page that will include Dept #, Dept Name, Qty and Box number. I want to insert a static PDF page behind the Cover page as many times as what is listed in the Qty filed in the data file. So if my Qty is 492 I want 492 static PDF pages entered behind my Cover sheet. I have also attached a sample file of what I am looking for my output to look like.

Thank you in advance for your assistance.
Attached Files
File Type: zip Cover sheets-test.zip (9.17 MB, 10 views)
__________________
Amber Patterson
Voya/Williams Lea
Fusion Pro Desktop 8.2.7
Windows 7
Adobe X Pro
Reply With Quote
  #2  
Old March 20th, 2015, 12:12 PM
David Miller David Miller is offline
Senior Contributor
 
Join Date: Oct 2008
Location: Wallingford, CT
Posts: 263
Default Re: Variable Pages

You could try something like this in a Callback Rule.

OnRecordStart:
Code:
FusionPro.Composition.repeatRecordCount = Field("Quantity");
FusionPro.Composition.SetBodyPageUsage(1, FusionPro.Composition.repeatRecordNumber == 1);
Or more specific to your template:
Code:
FusionPro.Composition.repeatRecordCount = Field("COUNTS ");
FusionPro.Composition.SetBodyPageUsage(1, FusionPro.Composition.repeatRecordNumber == 1);
More info can be found here. But Ste provided an excellent description of what is happening below.
__________________
David Miller
FusionPro VDP Creator 10.0.26
Adobe Acrobat Pro 2019.008.20074
Suitcase Fusion 20.0.0 (7653)
macOS High Sierra 10.13.6

Last edited by David Miller; March 20th, 2015 at 06:52 PM..
Reply With Quote
  #3  
Old March 20th, 2015, 12:14 PM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Variable Pages

You can do this by repeating each record by the quantity in an OnRecordStart rule. So if the quantity in the data is 492, FP will repeat the record 492 times. This is set with "FusionPro.Composition.repeatRecordCount".

In addition to that, you want to set the 1st page in your template (your cover page) to only display on the initial run of the repetition. FusionPro keeps track of where it is in the 'repeat' process and allows you to access that information through "FusionPro.Composition.repeatRecordNumber." So you'll only want to display the cover page when the 'repeatRecordNumber' is equal to 1. Like this:
Code:
var qty = StringToNumber(Field("COUNTS "));
FusionPro.Composition.repeatRecordCount = qty;
FusionPro.Composition.SetBodyPageUsage(1, (FusionPro.Composition.repeatRecordNumber == 1));
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #4  
Old March 23rd, 2015, 08:25 AM
INGuser INGuser is offline
Junior Community Member
 
Join Date: Feb 2010
Location: Des Moines, IA
Posts: 41
Default Re: Variable Pages

Thank you. Both responses worked great. Just one other question that i did not think to add in the original post. Is there a way to use an impostion template with these rules. When I try to use the one that I have setup for simplex 8.5x11 to print two up on a 12x18 sheet it keeps giving me an error that reads "The number of pages in this record does not match the imposition signature: 1 blank pages will be added.
A body page does not have master page assigned." Any ideas?
__________________
Amber Patterson
Voya/Williams Lea
Fusion Pro Desktop 8.2.7
Windows 7
Adobe X Pro
Reply With Quote
  #5  
Old March 23rd, 2015, 09:04 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Variable Pages

That's because technically the first time through the repeat, you'll have two pages (cover and static) and every other repeat is just the static page. You'll just need to repeat the record by the quantity + 1 (for the cover) and set the page usage so that the each repeat is only producing 1 page:
Code:
var qty = StringToNumber(Field("COUNTS "));
FusionPro.Composition.repeatRecordCount = qty + 1; // Plus 1 for cover
FusionPro.Composition.SetBodyPageUsage(1, (FusionPro.Composition.repeatRecordNumber == 1));
FusionPro.Composition.SetBodyPageUsage(2, (FusionPro.Composition.repeatRecordNumber != 1));
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.