scottws Posted January 29, 2014 Share Posted January 29, 2014 (edited) We print 1.85" x 6" numbered sports tickets, 20-up per 13" x 19" sheet. I'm trying to write a rule that places individual ticket backs (1.85" x 6") on the imposed sheets. Specifically, assuming I have 7 different backs, I'd like the first back to print on imposition sheets 1, 8, 15, 22, etc. Second back would print on imposition sheet 2, 9, 16, 23, etc. Can someone point me in the right direction? Edited January 29, 2014 by scottws clarity Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 29, 2014 Share Posted January 29, 2014 Just use a two-page FusionPro template, where the second page is the back of each ticket, and use a Duplex imposition template. If you're not using stacked imposition, then it's just a matter of calling out a new back graphic every 20 tickets, with a Graphic rule doing something like this: var backGraphics = [ "Back1.jpg", "Second graphic.tif", "etc", ] // all seven listed here return CreateResource(backGraphics[int(FusionPro.Composition.inputRecordNumber / 20) % 7]); Quote Link to comment Share on other sites More sharing options...
scottws Posted January 29, 2014 Author Share Posted January 29, 2014 Unfortunately, It does stack. I could use a script that calls out a back depending upon what the ticket front number ends with, but can't find that in the RulesSystemGuide. Quote Link to comment Share on other sites More sharing options...
step Posted January 29, 2014 Share Posted January 29, 2014 Can you be more specific about how you'd use the ticket number to call the correct back? What numbers correlate with what back? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 30, 2014 Share Posted January 30, 2014 Unfortunately, It does stack. I could use a script that calls out a back depending upon what the ticket front number ends with, but can't find that in the RulesSystemGuide. You should be able to use the FusionPro.Composition.impositionSheetNumber property. Actually, this is simpler than what I posted before, even for non-stacked imposition. Quote Link to comment Share on other sites More sharing options...
scottws Posted January 30, 2014 Author Share Posted January 30, 2014 (edited) Can you be more specific about how you'd use the ticket number to call the correct back? What numbers correlate with what back? For a stack of 50, the first sheet would have ticket numbers: 1 101 201 301 401 501 601 701 801 901 51 151 251 351 451 551 651 751 851 951 These would all have Back 1. Next 2 102 202 302 402 502 602 702 802 902 52 152 252 352 452 552 652 752 852 952 Would have back 2, and so on. Thus I thought Back 1 could be called out for ticket numbers ending in "1," Back 2 would be called out for ticket numbers ending in "2," etc. Edited January 30, 2014 by scottws clarity Quote Link to comment Share on other sites More sharing options...
scottws Posted January 30, 2014 Author Share Posted January 30, 2014 Here's a sample script. It works fine, but it would require code for every composition sheet, the number of which often runs into the thousands. Quote Link to comment Share on other sites More sharing options...
step Posted January 30, 2014 Share Posted January 30, 2014 You can try this: var imposheet = FusionPro.Composition.impositionSheetNumber; var numOfBacks = 7; // Total number of backs you want to pull in var back = (imposheet%numOfBacks == 0) ? numOfBacks : imposheet%numOfBacks; return Resource("B " + back + ".pdf"); Quote Link to comment Share on other sites More sharing options...
scottws Posted January 30, 2014 Author Share Posted January 30, 2014 Sorry, I'm not clear on the return Resource line. I have 7 backs B 1.pdf B 2.pdf B 3.pdf etc. Using your code, I get the message RandomBack, line 4 Error: In resource(), no resource named B NaN.pdf I can make the backs 1-seven page file if need be. Quote Link to comment Share on other sites More sharing options...
step Posted January 30, 2014 Share Posted January 30, 2014 You get that error when trying to validate the rule or when you run the composition? Quote Link to comment Share on other sites More sharing options...
scottws Posted January 30, 2014 Author Share Posted January 30, 2014 When validating. When I run the composition, I get Sheet #1, record #1 RandomBack, line 4: Error: In Resource(), no resource named B 1.pdf No value associated to graphic copyhole <RandomBack> in record 1. Quote Link to comment Share on other sites More sharing options...
scottws Posted January 30, 2014 Author Share Posted January 30, 2014 Hang on! It works! Stupid mistake on my part. Thanks so much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.