PDA

View Full Version : Using template Pages


dreimer
July 10th, 2013, 08:53 AM
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??

Dan Korn
July 10th, 2013, 10:06 AM
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.

dreimer
July 10th, 2013, 10:15 AM
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.

dreimer
July 10th, 2013, 10:36 AM
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.

Dan Korn
July 10th, 2013, 12:27 PM
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 (http://forums.pti.com/showthread.php?t=3085). 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.

dreimer
July 10th, 2013, 12:32 PM
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?

Dan Korn
July 10th, 2013, 01:16 PM
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.

ddwwhh
February 26th, 2015, 09:11 PM
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","999999999 9");
checktemplate.AddTextVar("Check2FrontSeqDig","888888888 9");
checktemplate.AddTextVar("Check3FrontSeqDig","777777777 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?

step
February 27th, 2015, 06:34 AM
Shouldn't you capitalize the "G" in "Addgraphic?"

checktemplate.AddGraphic("CheckPageBackground:", "c:\\outlook\\JPB\\M-105232 META CA CHECK 1446199_85x11 1.pdf");

ddwwhh
February 27th, 2015, 10:56 AM
Thanks...most programming languages I use don't care about the case.