Go Back   PTI Marketing Technologies User Community > Software-Related Talk > The JavaScript Library

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 10th, 2017, 08:43 AM
jimmyhartington jimmyhartington is offline
Regular Contributor
 
Join Date: Nov 2012
Posts: 53
Default Duplicate/repeat only page 1

Hi

I have a business card template, where I need page 1 to be duplicate, so I have 20 copies to make the imposition be correct.
The back of the imposition is page 2-21, so the customer gets a mix of colors.

Is the a way to duplicate only one page in a template?
Or a way to make an impostion, so I can accomplish this?

Here is a copy of my template: http://d.pr/f/Xnrk
__________________
Kind regards Jimmy Hartington

-------
Happy MarcomCentral® customer - OS version: OS X 10.12.6 - Acrobat version: XI - FusionPro version: 10.0.16
Reply With Quote
  #2  
Old February 10th, 2017, 09:37 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 954
Default Re: Duplicate/repeat only page 1

Well, that's not exactly how it works – you aren't really repeating only the first page. In FusionPro "repeating" is done at the record level – not the page level. If you composed your template as is with only one record, you would get a 21 page record that FusionPro believes should collate so you'd probably find that it didn't impose as you'd expect as well.

What you want to do is repeat each record 20 times and use "SetBodyPageUsage" to programmatically toggle which back is enabled. That way you'll end up with 20 records that are two pages each (front and back). Just add this to an OnRecordStart callback rule:
Code:
FusionPro.Composition.repeatRecordCount = 20;
for (var page = 2; page <= 21; page++)
  FusionPro.Composition.SetBodyPageUsage(page, page == FusionPro.Composition.repeatRecordNumber + 1);
That tells FusionPro to repeat each record 20 times. During each repetition, it cycles from 2 to 21 enabling the page that corresponds to the current iteration and disabling the others. In other words, on the first iteration of the repetition (repeatRecordNumber = 1) it enables the first back (page 2; or repeatRecordNumber + 1) and disables pages 3 - 21 because they are not equal to the repeatRecordNumber. On the second iteration (repeatRecordNumber = 2) it enables the second back and disables the others and so forth.

Also, from looking at your template, it looks like there's really only 6 unique backs to each card. In the future, if you wanted to save yourself the trouble of duplicating those pages to pad your document to 21 pages, you could just have a 7 page template and use a remainder operator to cycle through those 6 backs until 20 cards have been created:
Code:
FusionPro.Composition.repeatRecordCount = 20;
for (var page = 2; page <= 7; page++)
  FusionPro.Composition.SetBodyPageUsage(page,
    page == ((FusionPro.Composition.repeatRecordNumber + 1) % 7 || 7));
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #3  
Old February 10th, 2017, 11:45 AM
jimmyhartington jimmyhartington is offline
Regular Contributor
 
Join Date: Nov 2012
Posts: 53
Default Re: Duplicate/repeat only page 1

Thanks.

This works just perfectly.

I now also understand the duplicate record.
__________________
Kind regards Jimmy Hartington

-------
Happy MarcomCentral® customer - OS version: OS X 10.12.6 - Acrobat version: XI - FusionPro version: 10.0.16
Reply With Quote
  #4  
Old March 20th, 2017, 05:59 PM
Kim Kim is offline
Regular Contributor
 
Join Date: Sep 2008
Posts: 69
Default Re: Duplicate/repeat only page 1

Hi Ste,

I've got a similar need for a business card that needs to have the same front and 5 different backs. I need to wind up with a pack of 250 cards with 50 of each back.

I seem to be missing something in my imposition settings because I'm getting an error when I compose of "the number of pages in this record does not match imposition signature, 1 blank page will be added".

The front looks correct in the composed output with 21 cards imposed as expected. But the back page shows the 5 backs repeated with random blanks on each back page. I want to impose the records 21-up, so I think that's what's causing my problem. I was expecting to be able to output and keep it ordered to cut and stack so that I wind up with 50 of 1 back, followed by 50 of the next, etc.

I'm using the following rule with my 5 backs set as unused pages with unique names.

FusionPro.Composition.repeatRecordCount = 250;
for (var page = 2; page <= 6; page++)
FusionPro.Composition.SetBodyPageUsage(page,
page == ((FusionPro.Composition.repeatRecordNumber + 1) % 6 || 6));

My imposition file is set for 6 records with step and repeat settings for Stack count 1, vertical 7, and horizontal 3.

Any ideas on what I'm missing?

Thanks,
Kim
__________________
Fusion Pro Desktop 10.0.16 & Server • Acrobat Pro DC • Mac OSX 10.12
Reply With Quote
  #5  
Old March 21st, 2017, 08:29 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 954
Default Re: Duplicate/repeat only page 1

It would be easier to tell where the issue is if you'd attach an example of your job.

At first glance, it sounds like you're doing something a little different than what Jimmy was doing. It sounds like you want 250 copies of each record and you want the first 50 copies of that record to have "Back A," the second 50 copies to have "Back B," etc. Do I understand that correctly? If so, try this:
Code:
FusionPro.Composition.repeatRecordCount = 250;
for (var pg = 2; pg <= 6; pg++)
  FusionPro.Composition.SetBodyPageUsage(pg,
    pg == (Math.ceil(FusionPro.Composition.repeatRecordNumber / 50) + 1));
You probably need to tweak your imposition definition a little to get the results you want as well but like I said before, it would be easier to help if you'd post your files.
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #6  
Old March 21st, 2017, 11:41 AM
Kim Kim is offline
Regular Contributor
 
Join Date: Sep 2008
Posts: 69
Default Re: Duplicate/repeat only page 1

You understood perfectly. This is exactly what I needed. Thanks so much!

Now I'm moving on to figuring out the best way to get just the 1st (front) page composed for a 1-up proof, but a final print file that's all pages imposed 21-up.

Basically I'll need the first page by itself as a 3.5x2 1 page file for a proof and the final output file imposed 21-up on a press sheet for printing. Not sure if there may be a way (using OnRecordStart and SetBodyPage rules?) to make a 1-up, 1 page proof and the 21-up full print output files at the same time. Or whether it would be better to have a 1-up proof file and then generate the print ready file from another file setup for that after approval. Hope that makes sense. I'll go do some research first and then start another thread...

Thanks again for the fast help on my repeatRecordCount rule!!
__________________
Fusion Pro Desktop 10.0.16 & Server • Acrobat Pro DC • Mac OSX 10.12
Reply With Quote
Reply

Tags
imposition, repeat

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 05:03 AM.


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