Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library


Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old October 1st, 2015, 01:36 PM
jwhittaker jwhittaker is offline
Senior Contributor
Join Date: Feb 2009
Location: San Diego
Posts: 172
Default Re: Javascript Rule to suppress pages at preview

Try setting all your pages to unused and name them 1,2,3,etc.
The code below will turn on pages when you are doing an online or desktop preview and will turn the other pages on when you compose online or on the desktop.

then add this code to the onrecord start rule

onlinePreviewVal = FusionPro.Composition.JobOptions.isOnlinePreview;
desktopPreviewVal = FusionPro.Composition.isPreview;

if (onlinePreviewVal == "Yes" || desktopPreviewVal == true)
FusionPro.Composition.SetBodyPageUsage("1", true);
FusionPro.Composition.SetBodyPageUsage("2", true);
FusionPro.Composition.SetBodyPageUsage("3", true);
FusionPro.Composition.SetBodyPageUsage("4", true);
FusionPro.Composition.SetBodyPageUsage("5", true);
FusionPro.Composition.SetBodyPageUsage("6", true);
FusionPro.Composition.SetBodyPageUsage("7", true);
FusionPro.Composition.SetBodyPageUsage("15", true);
FusionPro.Composition.SetBodyPageUsage("16", true);
FusionPro.Composition.SetBodyPageUsage("17", true);
FusionPro.Composition.SetBodyPageUsage("18", true);
FusionPro.Composition.SetBodyPageUsage("19", true);
FusionPro.Composition.SetBodyPageUsage("20", true);
FusionPro.Composition.SetBodyPageUsage("21", true);
FusionPro VDP 12.1.3 | Windows 10 Pro | Acrobat DC
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 02:56 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.