dreimer Posted September 26, 2014 Share Posted September 26, 2014 (edited) Is there a way to suppress my artwork when the records are blank? This is for imposition purposes where I want to have blank records and no artwork for some positions in the imposed PDF. I tried this rule in the OnJobStart and it validates but the artwork still gets put it. Validating the rule looks correct although it says "ignored at composition time" if (Field("Print Qty") != "") { return FusionPro.Composition.composeThisRecord = true; } else { return FusionPro.Composition.composeThisRecord = false; } Is what I am trying possible? Edited September 26, 2014 by dreimer Quote Link to comment Share on other sites More sharing options...
dreimer Posted September 26, 2014 Author Share Posted September 26, 2014 If anyone is able to figure this out, please post. For now I just cheated and added a blank page and created a OnRecordStart rule to switch the page usage from Page 1 for records with data and my blank page 2 for empty data records. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted September 26, 2014 Share Posted September 26, 2014 Is there a way to suppress my artwork when the records are blank? This is for imposition purposes where I want to have blank records and no artwork for some positions in the imposed PDF. I tried this rule in the OnJobStart There's your problem. OnJobStart is the wrong place to do this. The whole concept of "this record" doesn't mean anything to the job as a whole. You need to move the logic setting FusionPro.Composition.composeThisRecord to OnRecordStart, where it actually does something specific to each record. and it validates but the artwork still gets put it. Validating the rule looks correct although it says "ignored at composition time" if (Field("Print Qty") != "") { [color="red"]return[/color] FusionPro.Composition.composeThisRecord = true; } else { [color="red"]return [/color]FusionPro.Composition.composeThisRecord = false; } Also, get rid of the "return" keywords in there. You only need to set the FusionPro.Composition.composeThisRecord property; you don't need to return it as well, and depending on what else is in the rule, the return statement could break any other logic below it, as "return" basically stops execution of any code in the rule and returns control to the caller. In other words, even though the value returned may not have any effect on the composition, the return statement itself definitely could. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted September 26, 2014 Share Posted September 26, 2014 Also, the logic (which needs to go into OnRecordStart) can be reduced to this: FusionPro.Composition.composeThisRecord = (Field("Print Qty") != ""); Or, even more succinctly: FusionPro.Composition.composeThisRecord = !!Field("Print Qty"); Quote Link to comment Share on other sites More sharing options...
dreimer Posted September 26, 2014 Author Share Posted September 26, 2014 Well that makes sense. So I tried your rules and the results are not what I wanted. The records get stacked up if the Print qty is empty. I want it to leave those positions blank when that field is empty. So say my Imposition has 7 across and 10 high. So say the first 25 records have a Print qty of 1 the next 20 have no print qty and the last 25 records have a print qty of 1. I would want the 20 positions in the imposed file blank and not stack the last 25 up to the first 25. Hope that makes sense. I think Fusion Pro tries to create the least amount of pages possible when Imposing so I am not sure there is a way to do it with a rule except for the way I did it with a blank page. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted September 26, 2014 Share Posted September 26, 2014 Well that makes sense. So I tried your rules and the results are not what I wanted. Well, I wasn't trying to solve the entire problem, I was just pointing out why that code in OnJobStart had no effect at all. The records get stacked up if the Print qty is empty. I want it to leave those positions blank when that field is empty. So say my Imposition has 7 across and 10 high. So say the first 25 records have a Print qty of 1 the next 20 have no print qty and the last 25 records have a print qty of 1. I would want the 20 positions in the imposed file blank and not stack the last 25 up to the first 25. Hope that makes sense. It's very hard to visualize this kind of stuff, at least for me. If you could collect up a sample job, with the FPI file, that might be worth a thousand words. I think Fusion Pro tries to create the least amount of pages possible when Imposing so I am not sure there is a way to do it with a rule except for the way I did it with a blank page. FusionPro creates exactly as many pages as you tell it to, whether it's imposing or not. (Although if you are doing imposition, FusionPro does expect that each record which is composed generates the same number of pages.) But if you skip a record completely, then there are no pages output for it. So while I don't know if I understand completely what you're trying to accomplish, I think you're right that you want a blank page for the record instead of nothing at all. In that case, you don't want to set FusionPro.Composition.composeThisRecord, you just want to set the page usage to output your blank page instead of the "actual" page. Or, possibly more simply, just have whatever rules are populating the page with content return nothing. Quote Link to comment Share on other sites More sharing options...
step Posted September 26, 2014 Share Posted September 26, 2014 Don, you could put a text or graphic frame over your entire template and fill it with white and turn it on and off in the OnRecordStart rule based on the quantity field: FindTextFrame("white-text-frame").suppress = !!Field("Print Qty"); That being said, I think your current solution of adding an extra page to your template is a better method. 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.