Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 10th, 2013, 08:53 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 469
Default Using template Pages

I have uploaded a test for using the template pages. I am trying to get the output PDF to contain multiple records of my data, but not sure how to adjust the rule that I tried. Right now I get the same barcode (first record of my data) in all six spots of the page. I want to get the first six barcodes (records 1 to 6 of my data)on the page. I am trying this because I haven't figured out a way to do this as an imposition of the one-up and be able to have the header at the top of the page. Maybe there is a better way to do what I am trying??
Attached Files
File Type: zip TemplateTest_FP.zip (7.97 MB, 24 views)
__________________
Don Reimer - JavaScript Novice

MAC OS 10.12.5 Acrobat XI 11.0.0 FP Creator 10.0.16
Windows 7 Acrobat X 10.1.4 FP Creator 9.3.9
Reply With Quote
  #2  
Old July 10th, 2013, 10:06 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,331
Default Re: Using template Pages

That's not the way that templates work. You need to assign different data to different instantiations of the template, and call out the template-specific variables that you're defining with FPRepeatableComponent.AddTextVar() in the template itself (in text frames on the template page) in order for there to be different data when you use the template in multiple places.

You have a rule called "Template" in your job, which you're calling out in all those text frames, but the template itself is not using the "Record" variable which you're defining with FPRepeatableComponent.AddTextVar(). Even if you were to call out the "Record" variable, though, it will always be the same, since you always call that same rule to assign its value. Typically, jobs that use repeatable components (templates) have multiple rules which call out the template with different template variables.

Also, if you want to have multiple output records of data on the same output page, the usual way to do that is with Imposition. You could, of course, set your data source to "None" and read in the data as an external data file (with ExternalDataFileEx), and then populate the frames with it (ideally in a loop in OnRecordStart with calls to FusionPro.Composition.AddVariable(), or calls to FindTextFrame() and the .content property) to accomplish a "multi-up" output. But Imposition was designed to take care of all of that for you.
__________________
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
  #3  
Old July 10th, 2013, 10:15 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 469
Default Re: Using template Pages

Yeah the "Record" part of the rule wasn't right, but I see what you are saying now.

I understand that using Imposition would be the best way to do this. My problem is, is there a way to have a title at the top of the impositioned file only and not in my one-up Fusion Pro Set-up? I attached the basic idea, with the exception of all these are the same barcode. If the title was in my one-up, it would get duplicated 6 times with the barcode and I don't want that.
Attached Files
File Type: pdf Test Data-Output.pdf (57.9 KB, 23 views)
__________________
Don Reimer - JavaScript Novice

MAC OS 10.12.5 Acrobat XI 11.0.0 FP Creator 10.0.16
Windows 7 Acrobat X 10.1.4 FP Creator 9.3.9
Reply With Quote
  #4  
Old July 10th, 2013, 10:36 AM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 469
Default Re: Using template Pages

If I had control of the slug location from the fpi file I could get what I need. Is there a way to change the X and Y of the slug other than the Mark Offset on the imposition tab of composition? That would be great, because that is very limited.
__________________
Don Reimer - JavaScript Novice

MAC OS 10.12.5 Acrobat XI 11.0.0 FP Creator 10.0.16
Windows 7 Acrobat X 10.1.4 FP Creator 9.3.9
Reply With Quote
  #5  
Old July 10th, 2013, 12:27 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,331
Default Re: Using template Pages

Quote:
Originally Posted by dreimer View Post
If I had control of the slug location from the fpi file I could get what I need. Is there a way to change the X and Y of the slug other than the Mark Offset on the imposition tab of composition? That would be great, because that is very limited.
You can do exactly this in FusionPro 8.2. You can set up a template page, but instead of using it as a repeatable component, you can set it as the background of the imposed sheet, to put frames anywhere you want on the sheeet, in addition to the imposed pages. You should upgrade to the latest version (currently 9.1) and try it.
__________________
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
  #6  
Old July 10th, 2013, 12:32 PM
dreimer dreimer is offline
Senior Contributor
 
Join Date: Oct 2010
Location: Shakopee, MN
Posts: 469
Default Re: Using template Pages

Oh nice, I will have to look into upgrading. I see some other features in 8.2 that could come in handy. Is the cost more to upgrade to 9 as opposed to 8?
__________________
Don Reimer - JavaScript Novice

MAC OS 10.12.5 Acrobat XI 11.0.0 FP Creator 10.0.16
Windows 7 Acrobat X 10.1.4 FP Creator 9.3.9
Reply With Quote
  #7  
Old July 10th, 2013, 01:16 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,331
Default Re: Using template Pages

Quote:
Originally Posted by dreimer View Post
Oh nice, I will have to look into upgrading. I see some other features in 8.2 that could come in handy. Is the cost more to upgrade to 9 as opposed to 8?
I'm not sure about the pricing; you'll have to contact Sales about that.
__________________
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
  #8  
Old February 26th, 2015, 09:11 PM
ddwwhh ddwwhh is offline
Junior Community Member
 
Join Date: Feb 2015
Posts: 14
Default Re: Using template Pages

I am trying to follow the documentation pages 132-137 on creating a repeatable component from a template and my code in the rules is:

var checktemplate = new FPRepeatableComponent('CheckFrontTemplate');
checktemplate.Addgraphic("CheckPageBackground:", "c:\\outlook\\JPB\\M-105232 META CA CHECK 1446199_85x11 1.pdf");
checktemplate.AddTextVar("Check1FrontSeqDig","9999 99999 9");
checktemplate.AddTextVar("Check2FrontSeqDig","8888 88888 9");
checktemplate.AddTextVar("Check3FrontSeqDig","7777 77777 9");
return checktemplate;

When I validate I get checktemplate.addgraphic is not a valid function. It appears I am duplicating the code correctly but the variable checktemplate is not being properly created/initialized?
Reply With Quote
  #9  
Old February 27th, 2015, 06:34 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Using template Pages

Shouldn't you capitalize the "G" in "Addgraphic?"
Code:
checktemplate.AddGraphic("CheckPageBackground:", "c:\\outlook\\JPB\\M-105232 META CA CHECK 1446199_85x11 1.pdf");
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #10  
Old February 27th, 2015, 10:56 AM
ddwwhh ddwwhh is offline
Junior Community Member
 
Join Date: Feb 2015
Posts: 14
Default Re: Using template Pages

Thanks...most programming languages I use don't care about the case.
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 07:14 AM.


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