KDeLay Posted May 24, 2023 Share Posted May 24, 2023 Super new to FusionPro. I reached out to Marcom for help with this and they recommended that I use the PageUsage rule but I'm having a hard time writing the proper code to make this work. I have a 2 page PDF, each page is a different template. If the field "design" is "Basic" then I only want it to use page 1. If the field is "Featured" then I want it to only use page 2. Help! Quote Link to comment Share on other sites More sharing options...
Alex Marshall Posted May 24, 2023 Share Posted May 24, 2023 So add all pages as a single PDF, i.e. fronts and back with their variable frame layouts and specified field names within. Then name each page(Fusionpro>>Manage Pages>>Page Usage Set the pages to “Unused”. Instead of naming the pages, giving them unique names for the fronts Then create the rule, (Create Rules>>New>>>Callback>>OnRecordStart). We will use the field values as in this sample code. The rule below can be simplified greatly by only activating the page you need, since all the pages are marked unused initially. So it can be reduced like this example: if (Field("Design") == "Basic") FusionPro.Composition.SetBodyPageUsage("Basic Page 1", true); if (Field("Design") == "Featured") FusionPro.Composition.SetBodyPageUsage("Featured Page 2", true); 1 Quote Link to comment Share on other sites More sharing options...
KDeLay Posted May 25, 2023 Author Share Posted May 25, 2023 Thank you, worked perfectly! What would I change if my document was going to be double sided in the code? So the first option in the field would pull page 1 & 2 and the next option would pull 3 & 4? 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.