Go Back   PTI Marketing Technologies User Community > Software-Related Talk > The JavaScript Library > Graphic Rules

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 18th, 2014, 09:17 AM
Mikeness Mikeness is offline
Junior Community Member
 
Join Date: Dec 2014
Posts: 13
Default Calling second page of PDF

I've read through all the available posts but just can't seem to get this functionality to work.

I have a two page PDF template, loaded with 7 PDF resources, 2 of which are two-page documents while the balance are 1 page. I've setup a variable graphic frame on both pages and assigned a switch rule based on the "Version" field in our .mdb file.

The following rule works fine to call the first page of the PDF, however I can't seem to apply the pagenumber function to this structure. I've highlighted the two 2-page resources with red text.

What is the most straightforward method to be able to call on the second page of the resource in the second variable graphic frame?

Rule for page 1 that works well:

switch (Field("Version").toLowerCase())
{
case "NA".toLowerCase():
return Resource("NA");
case "NB".toLowerCase():
return Resource("NB");
case "TEB".toLowerCase():
return Resource("TEB");
case "TEC".toLowerCase():
return Resource("TEC");
case "TFA".toLowerCase():
return Resource("TFA");
case "TFB".toLowerCase():
return Resource("TFB");
case "TFC".toLowerCase():
return Resource("TFC");
default:
return "";
}
Reply With Quote
  #2  
Old December 18th, 2014, 09:44 AM
jwhittaker jwhittaker is offline
Senior Contributor
 
Join Date: Feb 2009
Location: San Diego
Posts: 151
Default Re: Calling second page of PDF

try this

switch (Field("Version").toLowerCase())
{
case "NA".toLowerCase():
return Resource("NA");
case "NB".toLowerCase():
return Resource("NB");
case "TEB".toLowerCase():
{
var image = Resource("TEB");
image.pagenumber = 2
return image;
}
//return Resource("TEB");
case "TEC".toLowerCase():
{
var image = Resource("TEC");
image.pagenumber = 2
return image;
}
//return Resource("TEC");
case "TFA".toLowerCase():
return Resource("TFA");
case "TFB".toLowerCase():
return Resource("TFB");
case "TFC".toLowerCase():
return Resource("TFC");
default:
return "";
}
__________________
FusionPro VDP Creator 10.0.16 | MacOS 10.12.8 | Acrobat XI
Reply With Quote
  #3  
Old December 18th, 2014, 10:09 AM
Mikeness Mikeness is offline
Junior Community Member
 
Join Date: Dec 2014
Posts: 13
Default Re: Calling second page of PDF

Worked like a charm! Thanks.
Reply With Quote
Reply

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:34 PM.


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