Jump to content

STACK and CUT not overflowing to 2nd page.


methogod

Recommended Posts

Idea is to drop in multiple PDF files in a local folder (all pdfs are FRONT AND BACKS - all static), and have them print in a cut/stack order. Pulling Number of times to repeat from the rules.

 

https://www.dropbox.com/s/ayt765s1yvbezhu/8sets101218Final.pdf?dl=0

 

This is how we use it currently, see files in drop box above.

 

But the new setup is for a two page PDF (2 body pages), vs a single body page above.

Link to comment
Share on other sites

OK lets try this again, need help in two places...

1st - how do i define the BACK/BODY2. How would i change this to output correctly.

 

This outputs a cut/stack only...

 

 

On Job Start

FusionPro.Composition.composeAllRecords = false;
FusionPro.Composition.endRecordNumber = 40; // Number of cards you have

 

On record start:

FusionPro.Composition.repeatRecordCount = 4; // Quantity of each card

 

var card = CreateResource("Binder1.pdf",'graphic',true);

card.countpages;

card.pagenumber = FusionPro.Composition.inputRecordNumber;

 

FindGraphicFrame("RAND").SetGraphic(card);

 

Link to comment
Share on other sites

Sorry, I was having trouble following your explanation. I didn't know what you meant by "BACK/BODY2" or "cut/stack only." You still want "cut/stack", but duplexed. Like I said, the easiest way to avoid confusion over jargon is to specify exactly what is different between the output you're getting and the output you're expecting, in plain English, something like, "Only the front of each card is being output. I need the backs as well." Anyway, I think I understand now what you're trying to do.

 

There are a couple of problems with the job. All of them can be seen by composing without Imposition, or even by Previewing the job. So I would work these problems out in Preview first before trying to compose.

 

First, you have two graphic frames with the same name, "RAND" (whatever that means). So when you do this:

FindGraphicFrame("RAND").SetGraphic(card);

You're assigning to only one of those two frames. You need to name the frame on the second page something else. I would name the two frames "Front" and "Back", and then put different pages from the resource into each one.

 

The second problem is that you're not accounting for using two pages from the resource for each output record.

 

At any rate, once you name your two frames differently, you don't need any OnJobStart rule to accomplish this. You only need a single OnRecordStart rule like so:

var card = CreateResource("Binder1.pdf", "graphic", true);

FusionPro.Composition.repeatRecordCount = Math.floor(card.countPages / 2); // Number of cards you have

// Start with a zero-based page number from a zero-based record number:
// 0 for record 0 (the first record), 2 for record 1 (the second record), etc.
card.pagenumber = (FusionPro.Composition.repeatRecordNumber - 1) * 2;

// One-based page number for the front.
card.pagenumber++;
FindGraphicFrame("Front").SetGraphic(card);

// Next page is the back.
card.pagenumber++;
FindGraphicFrame("Back").SetGraphic(card);

Note that you also don't need to hard-code the number of output records, since we know how many pages we're bringing in from the resource.

Link to comment
Share on other sites

That did it...

 

Do i still need to define number of card/sets?

 

FusionPro.Composition.composeAllRecords = false;
FusionPro.Composition.endRecordNumber = 20; // Number of sets of cards

 

 

One more question...

 

instead of using a combined file (binder1.pdf)

var card = CreateResource("Binder1.pdf", "graphic", true);

 

is there a way to say

 

Pull All PDF's files from a folder or the local directory instead of manually making a binder.pdf (ie. C:/TEST/)

 

and have it repeat each record based on the leading numbers in the name of the file...

 

This is what i get each time i get this order...

 

http://forums.pti.com/attachment.php?attachmentid=1910&stc=1&d=1541025518

 

If we rename the files so each started with ***-

where *** was the number of times it will repeat...

 

Trying to automate this as much as possible...

I know this is outside the norm, thanks for all your help so far.:D

 

 

thanks,

filesprovided.JPG.113f3884444a8bc447f3e68a78ec8029.JPG

Link to comment
Share on other sites

That did it...

Great!

Do i still need to define number of card/sets?

FusionPro.Composition.composeAllRecords = false;
FusionPro.Composition.endRecordNumber = 20; // Number of sets of cards

No. All the logic to repeat the necessary number of times to get the right number of output records is in that OnRecordStart rule. You can get rid of OnJobStart.

One more question...

instead of using a combined file (binder1.pdf)

var card = CreateResource("Binder1.pdf", "graphic", true);

is there a way to say

 

Pull All PDF's files from a folder or the local directory instead of manually making a binder.pdf (ie. C:/TEST/)

 

and have it repeat each record based on the leading numbers in the name of the file...

No, not with FusionPro VDP Creator. That kind of workflow requires FusionPro Server, where another application can do all the necessary searching for files and gathering data, then send that information to FusionPro for composition.

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...