Jump to content

Variable Slug Placement


Eric Patrick

Recommended Posts

I am setting up a job that needs a variable slug. I found the set up info in the Rules manual and have created the OnJobStart Rule. I have created a template page. But I can't find any info on how to place the Slug rule on the template page.

Is there a full explanation somewhere on how to set this up?

 

Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

In the sample file's OnJobStart rule, what is the following doing?

FusionPro.Composition.forcePreprocessing = true;

I do not see it mentioned in the manuals.

 

Also, can you attempt to expand on the use of

FusionPro.Composition.chunksBreakStacks = true;

I can not tell from the documentation whether that causes a stack to continue at the top of the first page in the same chunk, or if the stacking continues through multiple chunks in the same position (what I think rkronk was asking about in a recent thread). Perhaps the two lines above are working in tandem (despite the tutorial not having enough records to take advantage)?

Link to comment
Share on other sites

In the sample file's OnJobStart rule, what is the following doing?

FusionPro.Composition.forcePreprocessing = true;

I do not see it mentioned in the manuals.

What it does is force a preprocessing run through the data before the main composition pass. Preprocessing normally happens only when you either have (a) imposition with stacking (where we need to pre-calculate which pages go on which sheets in the stacks, which depends on the total number of output records) or (b) FP Expression images (which get created in parallel to the composition).

 

It actually has no effect in the sample job as provided, since it uses stacked imposition, so preprocessing is done anyway. However, if you were to remove that line from OnJobStart, and use an imposition template (FPI file) without stacking, then you would see that the information in the output on the imposed sheet background would not be able to correctly report the total number of records or sheets, since it can't know that until the job is done, unless you force it to do preprocessing.

 

It's not documented per se, but it is present in the Building Blocks dialog, on the Objects tab, under FusionPro (Global) -> Composition -> Record numbers and control.

Also, can you attempt to expand on the use of

FusionPro.Composition.chunksBreakStacks = true;

I can not tell from the documentation whether that causes a stack to continue at the top of the first page in the same chunk, or if the stacking continues through multiple chunks in the same position (what I think rkronk was asking about in a recent thread).

This is explained in the User Guide, in the section titled, "Interaction between stack breaks and output file breaks" (on page 216 of the latest version).

 

It doesn't have any effect on the sample job as provided, because, while it is using stacked imposition, it's not chunking the output to multiple files. However, if you were to set the stack size to say, 10, and then do this in OnRecordStart:

if (FieldChanged("ZIP"))
   FusionPro.Composition.OpenNewOutputFile();

Then you could compose with FusionPro.Composition.chunksBreakStacks set to true, and then compose again with it set to false (or without specifying it, which is the same thing), and you would see the difference in the output. If chunksBreakStacks is not set (or set to false), then the first output file (chunk) will have the entire stack of 10 records, even though they don't all have the same ZIP Codes. If you set chunksBreakStacks to true, then the first output file has just the first six records with the 92101 ZIP Code, and a new stack is started in the next output file.

Perhaps the two lines above are working in tandem (despite the tutorial not having enough records to take advantage)?

Well, they wouldn't really work together, since, if you were using stacked imposition, then the forcePreprocessing setting would be moot, and if you weren't using stacked imposition, then the chunksBreakStacks setting would be moot. But neither has any effect on the sample as provided.

Edited by Dan Korn
clarity
Link to comment
Share on other sites

  • 1 year later...
OK so I have the basics figured out for the slug on the background page. I am trying to get "Page 1 of 6", "Page 2 of 6", etc on the imposed PDF using

[center]Page «$pagenum» of «$pagecount»[/center]

in a text box on the background template page. It puts "Page 1 of 1" on all six pages. Is what I am trying possible? If so, how would I do this? TIA

Edited by dreimer
Link to comment
Share on other sites

OK so I have the basics figured out for the slug on the background page. I am trying to get "Page 1 of 6", "Page 2 of 6", etc on the imposed PDF using

[center]Page «$pagenum» of «$pagecount»[/center]

in a text box on the background template page.

I'm confused. Do you want the page numbers, or the imposed sheet numbers? For the background template page, it's the sheet number that's relevant.

It puts "Page 1 of 1" on all six pages. Is what I am trying possible? If so, how would I do this? TIA

Now I'm even more confused. What do you mean by "all six pages?" Do you mean the individual output pages? Didn't you just say you wanted the numbers on the imposed sheet background? Which is it?

 

If you want the imposed sheet number, you can use the $impositionsheetnumber variable, but it has to be on the imposition sheet background (the Template page), not on a Body page. If you want to use $pagenum, that has to go on a Body page, not on the sheet background.

Link to comment
Share on other sites

Also, the $pagenum and $pagecount variables are the per-record page numbers. If you have only one page per output record, those numbers will always only be 1, regardless of whether you're using imposition. If you want to count page numbers for the entire job, for all records, then you can use the $pagenumberinjob variable.
Link to comment
Share on other sites

Sorry for the confusion. I have the code I posted in a text box on the template page. I was trying to get page numbers of the imposed sheets. My data has 398 records. The art fits 70 up on an imposed sheets. So records 1-70 are on imposed sheet 1 and I want that to say Page 1 of 6. Records 71-140 are on imposed sheet 2 and I want that to say Page 2 of 6, and so on. Does that make sense? Can it be done?

 

I don't see the variable $impositionsheetnumber anywhere?

Edited by dreimer
Link to comment
Share on other sites

Sorry for the confusion. I have the code I posted in a text box on the template page. I was trying to get page numbers of the imposed sheets. My data has 398 records. The art fits 70 up on an imposed sheets. So records 1-70 are on imposed sheet 1 and I want that to say Page 1 of 6. Records 71-140 are on imposed sheet 2 and I want that to say Page 2 of 6, and so on. Does that make sense? Can it be done?

Yes. Use the $impositionsheetnumber and $impositiontotalsheets variables. Or use the FusionPro.Composition.impositionSheetNumber and FusionPro.Composition.impositionTotalSheets properties in a JavaScript rule. The nominal page numbers are per output page, and per-record, and don't change when imposition is used. It's the imposed sheet numbers you want here (even if you label them page numbers on the output sheets, which is fine).

I don't see the variable $impositionsheetnumber anywhere?

They're not all included in the Variables drop-down list in the Text Editor. This is one of those things where we try to weigh the utility of including every little bit of information in the UI versus the confusion all those options can cause.

 

Anyway, they're all listed here:

http://forums.pti.com/showpost.php?p=13793&postcount=3

 

The relevant JavaScript properties are all shown in the Building Blocks dialog, on the Objects tab, under FusionPro (Global) -> Composition -> Imposition.

Link to comment
Share on other sites

I apologize for being real dumb here but I can't get the $impositionsheetnumber and $impositiontotalsheets variables to work in a text box. I tried adding the << and >> but it looks at it as literal text.

 

I also tried using the a javascript rule using FusionPro.Composition.impositionSheetNumber and FusionPro.Composition.impositionTotalSheets but not sure how to get the syntax to work.

Link to comment
Share on other sites

I apologize for being real dumb here but I can't get the $impositionsheetnumber and $impositiontotalsheets variables to work in a text box. I tried adding the << and >> but it looks at it as literal text.

Paste "$impositionsheetnumber" (without the quotes) into the Variable drop-down combo/edit box and then click the Insert button.

I also tried using the a javascript rule using FusionPro.Composition.impositionSheetNumber and FusionPro.Composition.impositionTotalSheets but not sure how to get the syntax to work.

Something like this:

return "Sheet " + FusionPro.Composition.impositionSheetNumber + " of " + FusionPro.Composition.impositionTotalSheets;

You probably need to check the "Re-evaluate this rule for every text flow" box as well.

 

The sample job posted earlier in this thread has examples of most of what you need to do.

Link to comment
Share on other sites

OK, those both work perfectly.

 

Onto the next problem I need to figure out! This one may not work. Is there a way to also pull from the data the description (it is in a data field in my source data) for the first and last page that goes onto each imposed sheet? So for example, can I pull from a data field the description for record 1 and 70 and populate that on my template page to the imposed sheet 1, then pull data from the same field for records 71 and 140 to go on imposed sheet 2? I don't think this would be possible but you never know?

 

Thank you for your patience!

Edited by dreimer
Link to comment
Share on other sites

Onto the next problem I need to figure out! This one may not work. Is there a way to also pull from the data the description (it is in a data field in my source data) for the first and last page that goes onto each imposed sheet? So for example, can I pull from a data field the description for record 1 and 70 and populate that on my template page to the imposed sheet 1, then pull data from the same field for records 71 and 140 to go on imposed sheet 2? I don't think this would be possible but you never know?
I don't think there's an easy way to do this. If you call out a regular data field variable in a text frame on the Template imposition sheet background page, I believe the value will be from the "first" (although not necessarily the "top left") record on the sheet. But I don't know if there's a way to access the data from the "last" record on the sheet.

 

There probably is some tricky way to accomplish it, but I think that's beyond what can be done in the context of this forum.

 

You might want to consider redesigning the job to do a manual type of imposition, by outputting Repeatable Components into frames on a Body page, or maybe with a table, and reading in the data with ExternalDataFileEx, which would give you arbitrary (random) access into the data.

Link to comment
Share on other sites

Kind of figured that. I think I have a decent enough workaround by configuring the data a little differently upfront. I will just use the imposed file as my new FP template and impose that one with additional text boxes. Won't need the code you gave me previously, but I will for sure use that code for other things.

 

Thanks again!

Link to comment
Share on other sites

  • 4 months later...

I can't get the "impositionTotalSheets" to work. When I compose I get the impositionsheetnumber to count correctly but the total always returns 0. So I end up with 1 of 0, 2 of 0, 3 of 0, and so on.

 

Any ideas doesn't matter how many records I try.

Link to comment
Share on other sites

I can't get the "impositionTotalSheets" to work. When I compose I get the impositionsheetnumber to count correctly but the total always returns 0. So I end up with 1 of 0, 2 of 0, 3 of 0, and so on.

 

Any ideas doesn't matter how many records I try.

You said that both properties were working perfectly back in June. What changed? I'll bet that you're no longer using a stacked imposition template, so the preprocessing required to set impositionTotalSheets isn't being invoked. To invoke preprocessing and set that value, you can either go back to using a stacked imposition, or add this line to OnJobStart:

FusionPro.Composition.forcePreprocessing = true;

Link to comment
Share on other sites

  • 3 years later...

Have an additional request to this ... not quite sure if it's totally related though ...

 

I'm using the saddle stitch imposition scheme and I would like FusionPro to output the sheet number for each signature of the booklet that is being produced. There are 12 pages in the booklet in all and I would like something like "Impo sheet 1 of 3", "Impo sheet 2 of 3", "Impo sheet 3 of 3" to appear on the bottom of one side of the 6 sheets that the saddle stitch output pdf will contain. That way even if there are no page numbers in the actual document that is being printed, trimmed and stitched our bindery will still know the correct order. Getting the tag line to print only on one side was simple enough but they all say "Impo sheet 1 of 1" for all three sections. Am I missing something?

 

I've placed this in the text box on the imposition sheet

Impo sheet: «$impositionsheetnumber» of «$impositiontotalsheets»

I've also included the rule to preprocess the count. However since there is only one record I don't know if that is even necessary except for the rule to count the imposition sheets.

.

Link to comment
Share on other sites

Have an additional request to this ... not quite sure if it's totally related though ...

 

I'm using the saddle stitch imposition scheme

This should probably be a new thread, but okay.

I've placed this in the text box on the imposition sheet
Impo sheet: «$impositionsheetnumber» of «$impositiontotalsheets»

Basically that exact same thing works for me with the example template I posted earlier in this thread, even if I change to saddle-stitched imposition (without the horizontal repeat so it still fits on the sheet, see the attached FPI file):

http://forums.pti.com/showpost.php?p=11530&postcount=3

 

Can you try that and see if it properly outputs "sheet 1 of 5", etc.?

However since there is only one record I don't know if that is even necessary except for the rule to count the imposition sheets.

Wait, what do you mean "there is only one record"? If there's only one record to compose, you'll only get one imposed sheet output.

 

Or maybe you have the preprocessing rule wrong, or in the wrong place? It needs to go into OnJobStart.

 

Anyway, it's hard for me to know what's going on in your job without seeing it. I would double-check that it still works in the tutorial job, then look to see what's different in your job.

6-up-imposition-mod-saddle.fpi

Link to comment
Share on other sites

We have a few hundred templates for this customer but this is the first one that I've had to do for a booklet that requires a multi-stage process for our bindery - in this case a collated saddle stitch from three separate "signature" piles of a 12 page booklet.

 

Our customer would supply a pdf file (usually a flyer, a business card, a bag stuffer, or whatever marketing supply their sales forces needs). The templates are all automated through our website and an imposed pdf file ready for print is placed on our staging server ready for our digital press operators. Since there is normally only one item that is to be imposed multi-up on a sheet there is only 1 record in the instance file to process.

 

In my present situation of three signature piles each pile needs to be numbered so the bindery worker know in which order the piles are to be placed in the saddle-stitcher. If this were done by hand each time them I could just give them a collated file and they would count out three pages and stitch each booklet individually. But to do several thousand or even several hundred this way would be quite time consuming. So our digital operators need to run the file uncollated so the automated stitcher can be used. And I can't always rely on the customer providing numbers on the pdf file like they did for the test setup pdf file they provided. Nor can I place them on myself within the visible borders of the pdf file after it is trimmed - customer says that's a big no-no. So I have to put some kind of number on the print sheet itself to show the proper order.

 

Each time I try to accomplish this FusionPro states that there is just 1 imposition sheet even though it produced six of them for the saddle-stich booklet that contains 12 pages. I understand that there was only "1" record, but that record produced "6" total output pages.

 

I have included the template that I created and the sample file that was provided.

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