n2_space Posted July 10, 2012 Share Posted July 10, 2012 I have ~50 two page pdf's, each is for basically a different state. I want it to return the front page of the pdf based off the drop down in marcom and then the back side of the pdf on page two. A current template we have returns the first page: result = ""; if (Field("State") != "") { var Pic = new FusionProResource(Field("State"), "graphic", "true"); for (Pic.pagenumber = 1; Pic.pagenumber <= Pic.countPages; Pic.pagenumber++) if (Pic.pagenumber == Pic.countPages) { result += Pic.content; } else { result += Pic.content+"<p>"; } } return result; Now, how can I do it to return the 2nd page of the same pdf they select? Link to comment Share on other sites More sharing options...
Dan Korn Posted July 10, 2012 Share Posted July 10, 2012 The rule you have should work. You just need to create an Overflow page for the body page to flow into, as in this example: http://forums.pti.com/showthread.php?t=37 Link to comment Share on other sites More sharing options...
n2_space Posted July 11, 2012 Author Share Posted July 11, 2012 The rule you have should work. You just need to create an Overflow page for the body page to flow into, as in this example: http://forums.pti.com/showthread.php?t=37 I completely confused... I borrowed this code from a template we already have that has only one page variable, and the back page is static. The new template has 50 pdf's that are all 2 pages, so I want to pull the pdf and place page 1 on page one and page 2 on page 2. The way the template I borrowed from is set up, the frame is a graphic frame. The example you pointed me to is a text frame. To make matters worse, I decided to take and create another rule to just create the back page from a separate pdf. When I did this and previewed it, it worked wonderfully. However, when I upload to Marcom and preview it there, there is no back page. So now I am really confused I'm attaching the pdf here for what worked in preview in acrobat, but not in marcom.... any further suggestions? HR Medicare.pdf Link to comment Share on other sites More sharing options...
jwhittaker Posted July 11, 2012 Share Posted July 11, 2012 Using the pdf you supplied do the following and it should work on Marcom. Change the back page to a regular page not overflow. (always 2 pages) Add to javascript globals function FileNameFromPath(fullPath) { return String(fullPath).replace(/^.*(\\|\/|\:)/, ''); }HR Medicare x.pdf Link to comment Share on other sites More sharing options...
n2_space Posted July 11, 2012 Author Share Posted July 11, 2012 Using the pdf you supplied do the following and it should work on Marcom. Change the back page to a regular page not overflow. (always 2 pages) Add to javascript globals function FileNameFromPath(fullPath) { return String(fullPath).replace(/^.*(\\|\/|\:)/, ''); } Thanks! But, when I do this it just provides a blank page for the back side. How do I get it to pull page 2 of the pdf to put on the back? Link to comment Share on other sites More sharing options...
jwhittaker Posted July 11, 2012 Share Posted July 11, 2012 Sorry about that. I should have previewed my post. It didn't show everything I typed. You have to put in javascript globals and a new rule based on your naming convention. I'll attach a collect that should have everything you need to see how I got it to work.HR Medicare_collect.zip Link to comment Share on other sites More sharing options...
n2_space Posted July 11, 2012 Author Share Posted July 11, 2012 Sorry about that. I should have previewed my post. It didn't show everything I typed. You have to put in javascript globals and a new rule based on your naming convention. I'll attach a collect that should have everything you need to see how I got it to work. You rock, thank you so much! :D:D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.