Jump to content

using Imposition SlugLine


Recommended Posts

I need some help I am trying to print at the top of the 1st page of the ouput pdf.

 

using this rule in on job start

FusionPro.Composition.impositionSheetSlugText = "Store #"+ Field("store #");

 

I get this error with no information printing at the top of the page

 

uncaught exception: Error: In Field(), no data source defined or data could not be loaded

 

I am I missing a line of code?:confused:

Link to comment
Share on other sites

You're not in the context of a data record in OnJobStart. In other words, the Field function can be called only when a record is being composed, but in OnJobStart, you haven't started composing any records yet. (The OnJobStart rule is called before any data is processed, because you can change which records are composed there.)

 

More specifically, the slug line text is not meant to change from sheet to sheet. (It's not record-specific.) It's just a per-job setting, and using the FusionPro.Composition.impositionSheetSlugText property in OnJobStart merely overrides the per-job setting for the slug text specified in the FPI file (in FP Imposer).

 

You could always open up your data file (or another file) as an XDF, with "new ExternalDataFileEx", in the OnJobStart rule, and grab the store ID from there for your slug line.

 

If you really do want record-specific information to appear on the imposed sheet, you can set up a custom imposition background page, and any data fields you call out on text frames there will be from the first record composed on the sheet.

Edited by Dan Korn
Added note about custom imposition background
Link to comment
Share on other sites

I understand what you are saying

 

I only want to print the store number on the top of the 1st page

 

In the rules guide it says to put that code in the onjobstart and you can add variable which is what i did.

 

FusionPro's imposition system supports specifying the slug line in either the FP Imposer GUI or in the OnJobStart rule. When the slug line is defined in the OnJobStart rule, you’ll have the flexibility to not only use static text, but you can include variable data as well. For example,

FusionPro.Composition.impositionSheetSlugText = "Enter your slug text here.";

Please note that to turn on the slug line in the output file, you’ll need to select the Page Info checkbox in the Composition Settings dialog’s Imposition tab.

Link to comment
Share on other sites

Sorry, I can see how that documentation is misleading.

 

You can use variable data in the slug text, to an extent. You could have the rule insert, say, the current date, or a record range (FusionPro.Composition.startRecordNumber et al), or any other job setting (including one from FusionPro.Composition.JobOptions). But you can't use a field value from your primary data.

 

Also, the slug line appears on every imposed sheet, so you can't have it just appear on the first one.

 

A custom imposition background might be your best bet. You could have a text frame on it, and a rule that returns an empty string unless FusionPro.Composition.impositionSheetNumber == 1.

Link to comment
Share on other sites

  • 10 months later...

Dan,

 

I am using the code you had given me a while back to alter the name of the output file using leading zero's for the composition batch numbers in the OnNewOutput rule:

FusionPro.Composition.outputFileName = FusionPro.Composition.outputFileName.replace(new RegExp('\\d*\\.' + FusionPro.Composition.outputFormatExtension + '$',''), function(){return FormatNumber("000", FusionPro.Composition.currentOutputFileNumber) + "." + FusionPro.Composition.outputFormatExtension;});

I've been trying to put this same name on the imposition sheet using the method above? I have made a custom background imposition page for the output, but I can't seem to put this output name in any rule to display it on the sheet.

 

Thanks.

.

Link to comment
Share on other sites

I've been trying to put this same name on the imposition sheet using the method above? I have made a custom background imposition page for the output, but I can't seem to put this output name in any rule to display it on the sheet.

Please be more specific about exactly what the actual result is vs. the intended result. Do you get an error?

Link to comment
Share on other sites

Update ... I can get the output file name on the imposition sheet now, but for some reason the first page is always 1 less than the actual "batch/chunk" number of the file. I understand why ... but am unable to figure a way around it.

 

We want to number our sheets in such a manner because when we deliver these to an outside vendor (laminating, die-cutting, etc.) and they mess up something, we want the vendor to tell us exactly what file(s) and/or sheet(s) we need to redo over again.

 

As you can see the first page comes over as "file" 000 while the rest of the pages (200 total per file) have the proper batch number of 001. Each successive batch after that is the same way. The first page of batch 2 states file 001, the first page of batch 3 states file 002, etc. while the remaining pages are correct.

230799_EDHC-Card_001.pdf

Link to comment
Share on other sites

Update ... I can get the output file name on the imposition sheet now, but for some reason the first page is always 1 less than the actual "batch/chunk" number of the file. I understand why ... but am unable to figure a way around it.

 

We want to number our sheets in such a manner because when we deliver these to an outside vendor (laminating, die-cutting, etc.) and they mess up something, we want the vendor to tell us exactly what file(s) and/or sheet(s) we need to redo over again.

 

As you can see the first page comes over as "file" 000 while the rest of the pages (200 total per file) have the proper batch number of 001. Each successive batch after that is the same way. The first page of batch 2 states file 001, the first page of batch 3 states file 002, etc. while the remaining pages are correct.

What exactly are you doing to get those numbers? Are you using a sysvar, like $outputrecordnumberbysheet? Or a property like FusionPro.Composition.currentOutputFileNumber or FusionPro.Composition.impositionSheetNumber in a rule?

 

I would think that FusionPro.Composition.impositionSheetNumber, maybe with a +1, would do what you want. But it's hard to say without more details.

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