Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 7th, 2022, 12:56 PM
BetMason BetMason is offline
Forum n00b
 
Join Date: Feb 2022
Location: PA
Posts: 3
Question using Imposition SlugLine

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?
Reply With Quote
  #2  
Old March 7th, 2022, 01:54 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,640
Default Re: using Imposition SlugLine

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.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});

Last edited by Dan Korn; March 7th, 2022 at 01:57 PM.. Reason: Added note about custom imposition background
Reply With Quote
  #3  
Old March 8th, 2022, 06:25 AM
BetMason BetMason is offline
Forum n00b
 
Join Date: Feb 2022
Location: PA
Posts: 3
Default Re: using Imposition SlugLine

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.
Reply With Quote
  #4  
Old March 8th, 2022, 10:40 AM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,640
Default Re: using Imposition SlugLine

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.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #5  
Old March 8th, 2022, 12:50 PM
BetMason BetMason is offline
Forum n00b
 
Join Date: Feb 2022
Location: PA
Posts: 3
Default Re: using Imposition SlugLine

You are amazing. Thank you so much!!

It worked
Reply With Quote
Reply

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 06:46 AM.


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