Jump to content

Printing Specific Pages in a Document


MBee

Recommended Posts

I have a five page document where depending on choice of customer, either page 1 and 5; 2 and 5; 3 and 5 or 4 and 5 will print out. I need a rule to disable the other pages from being viewed or printed, depending on the selection. Basically hiding any page that is not containing relevance to the choice.

 

Choices are English 1 address (pages 1 and 5); English 2 addresses (pages 2 and 5); Japanese Name 1 address (pages 3 and 5), Japanese 2 addresses (pages 4 and 5). Default would be English 1 address.

 

Thanks for the help!

Link to comment
Share on other sites

Well, I don't know your field names or how you determine whether the addresses are in English or Japanese. But basically, you want to call FusionPro.Composition.SetBodyPageUsage for specific pages in OnRecordStart. Something like this:

var language = Field("language");
var numAddresses = Field("Address2") ? 2 : 1;
FusionPro.Composition.SetBodyPageUsage(1, language == "English" && numAddresses == 1);
FusionPro.Composition.SetBodyPageUsage(2, language == "English" && numAddresses == 2);
FusionPro.Composition.SetBodyPageUsage(3, language == "Japanese" && numAddresses == 1);
FusionPro.Composition.SetBodyPageUsage(4, language == "Japanese" && numAddresses == 2);

Or, depending on how your fields are set up, the logic might be a bit different. You may be able to set pages 1 through 4 to all be Unused in the Page Usage dialog, and then make one call to FusionPro.Composition.SetBodyPageUsage just to activate the page you want.

Edited by Dan Korn
typo
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...