Jump to content

Calling variable pages


sdelp

Recommended Posts

sdelp,

 

Depending on the number of pages that you want to call you can simply have multiple rules to call a separate page. For instance if I need to call the front and back of different postcards variably I use the rule as such...

 

"Front Page Rule"

 

var pdfFileName = "this is the pdf file that you want to use"

var r = new FusionProResource(pdfFileName, "graphic". true);

r.name = (pdfFileName);

r.pagenumber = 1;

if (r.exists) {

...return r;

}

 

"Back Page Rule"

 

var pdfFileName = "this is the pdf file that you want to use"

var r = new FusionProResource(pdfFileName, "graphic". true);

r.name = (pdfFileName);

r.pagenumber = 2;

if (r.exists) {

...return r;

}

 

 

Using the pagenumber function of the declared pdf file variable name (in my case "r"), you can tell FusionPro which page number to use.

 

Good Luck,

Link to comment
Share on other sites

Thank you for the reply.

 

Here is what I used to do:

 

if (Field("pub ") != "3044" && Field("pub ") != "3045" && Field("pub ") != "3048" && Field("pub ") != "3050" && Field("pub ") != "3051" && Field("pub ") != "3053") 
FusionPro.Composition.SetBodyPageUsage("Old Layout", false)
; 
else 
FusionPro.Composition.SetBodyPageUsage("New Layout", false)

 

Is there a way to mimic this to print a front and back? Thanks.

Link to comment
Share on other sites

Here is what we use. Using this you would have 3 pages in your layout. Name your variable page Front1, Front2, and StaticFront. Set Front1 and Front 2 to unused and leave the Static front always used.

 

if (Field("Version") == "Version 1")
   {
   FusionPro.Composition.SetBodyPageUsage("Front1",true);
   FusionPro.Composition.SetBodyPageUsage("Front2",false);
   FusionPro.Composition.SetBodyPageUsage("StaticFront",true);
   }

if (Field("Version") == "Version 2")
   {
   FusionPro.Composition.SetBodyPageUsage("Front1",false);
   FusionPro.Composition.SetBodyPageUsage("Front2",true);
   FusionPro.Composition.SetBodyPageUsage("StaticFront",true);
   }

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...