Jump to content

Repeat Records


dreimer

Recommended Posts

So I have a multipage PDF and I want to compose each in a 6-up imposition and repeat that 5 time for each page consecutively. I don't have a data source.

I am using a OnRecordStart rule of

 

FusionPro.Composition.repeatRecordCount = 5;

 

This does the repeating, but it does all pages and then repeats the whole set 4 more times.

 

I am trying to get 1,1,1,1,1,2,2,2,2,2,etc

 

But I am getting 1,2,3,4,5,1,2,3,4,5.

 

Is there a way to accomplish what I am trying.

Link to comment
Share on other sites

The repeat record system is set up to repeat the entire multi-page record, not to repeat each page separately or collate the pages. But it is possible to get the output you want. Here's one way:

var numPagesInTemplate = 5; // <- set this to the number of Body pages in the job
var numRepeats = 5; // <- set this to the number of times you want to repeat each page

FusionPro.Composition.repeatRecordCount = numRepeats * numPagesInTemplate;

var pageToUse = Math.floor((FusionPro.Composition.repeatRecordNumber - 1) / numPagesInTemplate) + 1;

for (var i = 1; i <= numPagesInTemplate; i++)
   FusionPro.Composition.SetBodyPageUsage(i, pageToUse == i);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...