Dan Korn Posted August 19, 2015 Share Posted August 19, 2015 I get the same "out of memory" error. The composition log file gives a pretty good clue as to what the problem is: Preprocessing record #1, input record 1 Preprocessing record #2, input record 1, repeat 2 of 20 Preprocessing record #3, input record 1, repeat 3 of 40 Preprocessing record #4, input record 1, repeat 4 of 80 Preprocessing record #5, input record 1, repeat 5 of 160 Preprocessing record #6, input record 1, repeat 6 of 320 Preprocessing record #7, input record 1, repeat 7 of 640 Preprocessing record #8, input record 1, repeat 8 of 1280 Preprocessing record #9, input record 1, repeat 9 of 2560 Preprocessing record #10, input record 1, repeat 10 of 5120 Preprocessing record #11, input record 1, repeat 11 of 10240 Preprocessing record #12, input record 1, repeat 12 of 20480 Preprocessing record #13, input record 1, repeat 13 of 40960 Preprocessing record #14, input record 1, repeat 14 of 81920 Preprocessing record #15, input record 1, repeat 15 of 163840 Preprocessing record #16, input record 1, repeat 16 of 327680 Preprocessing record #17, input record 1, repeat 17 of 655360 Preprocessing record #18, input record 1, repeat 18 of 1310720 That "of" number (the repeat count) increases logarithmically for each repeat, ad infinitum. This is the problem, in OnRecordStart: cards = cards*2; // ... FusionPro.Composition.repeatRecordCount = cards; I'm not sure what you're trying to do there, but you want to figure out the repeat count once and set it. Quote Link to comment Share on other sites More sharing options...
methogod Posted August 20, 2015 Share Posted August 20, 2015 last try here, i am out of time, need to print tomorrow.... here is the latest version. Tried all the variation i can think of, funny how singled sided is so easy and worked right away, but making it 2 sided is more difficult... Zip attached has all working files, PDF with template setup, "preview" works, and it uses the FPI correctly just seems to be missing the important question "how many times do you want to repeat each card (FRONT AND BACK)" Again the goal is to stack, so its faster to cut and box, then just Nup and having to separate tons of small piles.... Guess its time for a bounty... Working Solution gets LUNCH (well $20 gift card or paypal)... https://www.dropbox.com/s/8om5r4gd59q60pa/CK%20CUT%20AND%20STACK%20V4.zip?dl=0 Quote Link to comment Share on other sites More sharing options...
step Posted August 20, 2015 Share Posted August 20, 2015 Okay, here's how to make it work. And, I've actually tested it this time to verify that it's working. This goes in the JavaScript Globals and this is where you'll set the name of the PDF you're importing and the number of copies per card: var card = CreateResource("CKteamBusinesscards.pdf",'graphic',true); // Your PDF Resource var copies = 10; // 10 copies of each card var pages = []; This goes in OnJobStart: var pgCount = card.countPages; for (var i=0; i<pgCount; i=i+2) pages.push([i+1,i+2]); FusionPro.Composition.composeAllRecords = false; FusionPro.Composition.endRecordNumber = pgCount/2; Here the PDF that is defined global, will have its pages counted. The number of pages will be used to build the 'pages' array at the beginning of the job. It was also use the number of pages to determine the end "record" which was previously defined by the 'cards' variable. That way you don't have to manually change anything in the OnJobStart rule if the PDF you've defined globally contains more than 5 cards (10 pages). This goes in OnRecordStart: FusionPro.Composition.repeatRecordCount = copies; var [front,back] = pages[FusionPro.Composition.inputRecordNumber-1].map(function(s){ card.pagenumber = s; return card.content;}); FindGraphicFrame("ckfront").SetGraphic(front); FindGraphicFrame("ckback").SetGraphic(back); This is where the front and back is determined and assigned to its corresponding graphic frame. I believe you should still have my PayPal information Quote Link to comment Share on other sites More sharing options...
methogod Posted August 20, 2015 Share Posted August 20, 2015 will do just need a quick explanation how to set Javascript Globals... msg me your email address... Quote Link to comment Share on other sites More sharing options...
step Posted August 20, 2015 Share Posted August 20, 2015 FusionPro > Edit Rules and then click the "JavaScript Globals..." button in the bottom left. Quote Link to comment Share on other sites More sharing options...
methogod Posted August 20, 2015 Share Posted August 20, 2015 thanks works great, just doesn't show progress like the single sided version does... thanks again and pm me if you want LUNCH... 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.