rjohns Posted July 2, 2015 Share Posted July 2, 2015 I'm working on a project and I need some help. Basically, I want to insert a logo and text on the last page of a document. Here's more specific info: File Setup: Page 1 - body; cover Page 2 - body; first inside page Page 3 - overflow I'm inserting a 3 page PDF starting on page 2, so I'll end up with a 4 page document after composition. With this setup, pages 3 and 4 of the final composed document are generated from page 3 of the Acrobat file. I need to place a graphic and some text on page 4 of the composed document (the last page). I've approached it thinking: "If the current page is page 4, insert this text." After reading through a lot of threads, I couldn't find anything that really addressed what I'm trying to achieve. I tried adapting some of it, but didn't have much luck. I've tried using the following to insert the text: if (FusionPro.Composition.currentPageNumber == 4) return "1.1416.000000"; else return ""; But that didn't work. The text showed up on both overflow pages (pages 3 and 4). I also tried a variation like this: if (FusionPro.Composition.currentPageNumber == FusionPro.Composition.totalPages) return "1.1416.000000"; else return ""; And I got the same result. I must be missing something ... But what? Any help is greatly appreciated – thanks! Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted July 2, 2015 Share Posted July 2, 2015 If you know that the PDF you're inserting is always going to have a set number of pages, then you don't need to use an Overflow page. Instead, you can simply use a series of Body pages with Graphic frames for the inserted PDF. Then you can just put down whatever you want on the last Body page. Quote Link to comment Share on other sites More sharing options...
step Posted July 2, 2015 Share Posted July 2, 2015 (edited) Becka, I think checking the "Re-evaluate this rule for every text flow" in your rule editor should give you the results you're looking for. That being said, I think Dan is right (per usual) in saying that if you know the page count is always going to be 4, you might as well have 4 body pages. You've already got a 3 page document – what's one more? But if you set it up as an overflow page in anticipation of using the same template for importing PDFs that may include more than 3 pages, you could leave what you have and add another body page to the end making your template look like: Page 1 - body; cover Page 2 - body; first inside page Page 3 - overflow Page 4 - body; last page of the PDF you overflowed. Then your overflow rule would be something like: var pdf = CreateResource('/path/to/Your.pdf','graphic'); var result = []; for (var i=1; i<pdf.countPages; i++){ pdf.pagenumber = i; result.push(pdf.content); } return result.join('<p>'); And on your 4th page, you'd have a graphic frame to return the last page of the PDF and whatever else you want on the page. Like this: var pdf = CreateResource('/path/to/Your.pdf','graphic'); pdf.pagenumber = pdf.countPages; return pdf; Edited July 2, 2015 by step misspelled Becka Quote Link to comment Share on other sites More sharing options...
rjohns Posted July 10, 2015 Author Share Posted July 10, 2015 You know, it didn't even occur to me to approach it from that direction. Your suggestion worked perfectly. Thanks for the speedy response and great solution! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.