Albert Posted April 2, 2015 Share Posted April 2, 2015 Hello, I have fusion pro desktop version 8 on PC. Iwant to insert a multi page PDF file in a graphic field. Is this possible without the need to have the name of the pdf file? I have linked it in resources.... I dont know at the moment. Greetings, Albert Quote Link to comment Share on other sites More sharing options...
Alex Marshall Posted April 2, 2015 Share Posted April 2, 2015 You will have to create an overflow page that will flow the additional pages. See the User Guide topic “ It’s got to go somewhere”. First, you need to create the Rule and do the following Add the multipage PDF as a graphic resource. Start out with a 2 page blank pdf . Draw TEXT frame on each page as needed. Select FusionPro>>Manage Pages>>Page Usage Highlight page 2. Click Edit Specify "Type" as "Overflow" Give it name "Back_Page" Click "Ok", "Ok" Go to the first page of the template. Click on the text frame to bring up the "Text Frame" palette Click on "Overflow". Check the option for "Overflow Text To New Pages" Under "New Left Page", click the drop arrow for "Back_Page" Leave New Right Page as "None". Under "Add Pages", select "As Few Added As Possible" Click "Ok" Go into the Variable Text Editor, and insert the Rule name Go to the second page in the template Click on the text frame to bring up the "Text Frame" palette In the lower left, check the box for "OverFlow To" Click “Create Rules>>>New(Text)>>>Empty”. Check the box for “Treat Return Strings As Tagged Text”. Here is the Rule: var pathName = "..\\RESOURCES\\"; var FullResourcePath = pathName + Field("Store Message"); //change to match your data file field var x = new FusionProResource(FullResourcePath, "graphic", 1); if (!x.exists) ReportError("Graphic not found: " + FullResourcePath); var pdfString = ''; for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++) { x.pagenumber = pgnbr; pdfString += x.value + '<p>\n'; } Print("Result is: " + pdfString); return pdfString; Click “OK’, ‘OK’. Now if you “Preview”, you will only see the first page on the “Overflow” page. You will need compose a small record range to verify everything works correctly. Quote Link to comment Share on other sites More sharing options...
adam1991 Posted May 5, 2015 Share Posted May 5, 2015 Alex, I have a request for a tweak to this concept. I have a variable letter, one single page, but I want to attach a PDF to the end of that letter. The PDF filename is in the data file, and each PDF file is unique with an unknown number of pages. So in the end, each record delivers a varying number of pages for output. And in the end, of course, I need the VPS output to recognize each variable booklet length for subset finishing. Is this overflow area the general area to look for this functionality? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted May 5, 2015 Share Posted May 5, 2015 I have a request for a tweak to this concept. I have a variable letter, one single page, but I want to attach a PDF to the end of that letter. The PDF filename is in the data file, and each PDF file is unique with an unknown number of pages. So in the end, each record delivers a varying number of pages for output. Okay, so far, there's no "tweak;" you've merely restated the original question. And in the end, of course, I need the VPS output to recognize each variable booklet length for subset finishing. What kind of subset finishing exactly? And on what press/RIP? It's hard to give you a specific answer to such a general question, but generally, you want to specify finishing settings for the first page in the "subset," which, in the case you're asking about, is probably the Body page on which the text flow begins (i.e. the Body Page frame on which you're setting the Overflow Options). You can open up the Page Usage dialog (as described in Alex's post), select the appropriate Body page, click Edit, and then click on Finish Settings. Depending on the printer/RIP you're targeting, you can either use JDF finishing settings, or provide the printer's PPD file and specify PPD settings. Is this overflow area the general area to look for this functionality? I don't know what you mean by "this overflow area." It's about the Finish Settings in the Page Usage. Quote Link to comment Share on other sites More sharing options...
Stack Posted November 23, 2015 Share Posted November 23, 2015 I'm trying to use these instructions exactly as you've provided, Alex, but for some reason during composition, the first page (Body page) is coming up blank, and only one Overflow page is inserted, with only the first page of my resource PDF file showing up. Below is the message displayed in the log: Job started 12:56:41 - 1448301401. Creator: FusionPro(TM) VDP Creator 9.3.22 Computer Name: Prepress1’s Mac mini Current working folder: /Applications/PTI/FusionPro Temporary files folder: /var/folders/0_/n_pf7xv96dlfy8401gfbb8800000gn/T/ Template File: /Users/Thing1/Desktop/CustomBooklet_FPTemplate/CustomBooklet_FPTemplate.dif Input File: /Users/Thing1/Desktop/CustomBooklet_FPTemplate/Data.txt Job Config File: /Users/Thing1/Desktop/CustomBooklet_FPTemplate/Data-Output.cfg Result is: <graphic file="..\RESOURCES\Sample_4pg.pdf" pagenumber="1" /><p> <graphic file="..\RESOURCES\Sample_4pg.pdf" pagenumber="2" /><p> <graphic file="..\RESOURCES\Sample_4pg.pdf" pagenumber="3" /><p> <graphic file="..\RESOURCES\Sample_4pg.pdf" pagenumber="4" /><p> Composing record #1, input record 1 The specified Keep conditions could not be honored in the flow <>. Text is truncated. Job ended 12:56:41 - 1448301401. Total Job Time: Is there something I may be missing? You will have to create an overflow page that will flow the additional pages. See the User Guide topic “ It’s got to go somewhere”. First, you need to create the Rule and do the following Add the multipage PDF as a graphic resource. Start out with a 2 page blank pdf . Draw TEXT frame on each page as needed. Select FusionPro>>Manage Pages>>Page Usage Highlight page 2. Click Edit Specify "Type" as "Overflow" Give it name "Back_Page" Click "Ok", "Ok" Go to the first page of the template. Click on the text frame to bring up the "Text Frame" palette Click on "Overflow". Check the option for "Overflow Text To New Pages" Under "New Left Page", click the drop arrow for "Back_Page" Leave New Right Page as "None". Under "Add Pages", select "As Few Added As Possible" Click "Ok" Go into the Variable Text Editor, and insert the Rule name Go to the second page in the template Click on the text frame to bring up the "Text Frame" palette In the lower left, check the box for "OverFlow To" Click “Create Rules>>>New(Text)>>>Empty”. Check the box for “Treat Return Strings As Tagged Text”. Here is the Rule: var pathName = "..\\RESOURCES\\"; var FullResourcePath = pathName + Field("Store Message"); //change to match your data file field var x = new FusionProResource(FullResourcePath, "graphic", 1); if (!x.exists) ReportError("Graphic not found: " + FullResourcePath); var pdfString = ''; for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++) { x.pagenumber = pgnbr; pdfString += x.value + '<p>\n'; } Print("Result is: " + pdfString); return pdfString; Click “OK’, ‘OK’. Now if you “Preview”, you will only see the first page on the “Overflow” page. You will need compose a small record range to verify everything works correctly. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted November 24, 2015 Share Posted November 24, 2015 The specified Keep conditions could not be honored in the flow <>. Text is truncated. Make the text frames that are holding the inline graphics, on both the Body page and the Overflow page, a little bigger than the pages themselves, so that there's some wiggle room to fit the graphics. Quote Link to comment Share on other sites More sharing options...
Stack Posted November 24, 2015 Share Posted November 24, 2015 Make the text frames that are holding the inline graphics, on both the Body page and the Overflow page, a little bigger than the pages themselves, so that there's some wiggle room to fit the graphics. Problem solved! Although I noticed that the first page of the PDF inserted right on the bottom trim, so it didn't bleed. I just had to adjust the offset of the Y-axis, or rather leave it at .125". Thanks for your help! Quote Link to comment Share on other sites More sharing options...
JonBowman Posted January 10, 2016 Share Posted January 10, 2016 I have several PDFs that are being used as variable data. Each PDF is 4 pages, however when I use the above java script as a Rule my output is 5 pages. Can't figure out why I am getting 5 pages of output from a 4 page PDF. Help? Quote Link to comment Share on other sites More sharing options...
step Posted January 11, 2016 Share Posted January 11, 2016 (edited) Is the 5th page blank? It could be because a paragraph tag is added to every page in the for loop. You could alter the code to remove the last paragraph tag by adding the line in red: var pathName = "..\\RESOURCES\\"; var FullResourcePath = pathName + Field("Store Message"); //change to match your data file field var x = new FusionProResource(FullResourcePath, "graphic", 1); if (!x.exists) ReportError("Graphic not found: " + FullResourcePath); var pdfString = ''; for (var pgnbr = 1; pgnbr <= x.countPages; pgnbr++) { x.pagenumber = pgnbr; pdfString += x.value + '<p>\n'; } Print("Result is: " + pdfString); return pdfString[color="Red"].replace(/<p>\\n$/,'')[/color]; Edited January 11, 2016 by step Quote Link to comment Share on other sites More sharing options...
JonBowman Posted January 11, 2016 Share Posted January 11, 2016 Ste, When I add the code in read I get the error TypeError: pdfString.join is not a function. Jon Quote Link to comment Share on other sites More sharing options...
step Posted January 11, 2016 Share Posted January 11, 2016 (edited) Oh, sorry about that. I've fixed it in my original post. It should have said 'replace' – not 'join.' Dunno where that came from. In case you wanted to use 'join' instead of a 'replace' (which in my opinion is cleaner anyway) you could do so by using the following code: var pathName = "..\\RESOURCES\\"; var FullResourcePath = pathName + Field("Store Message"); //change to match your data file field var x = CreateResource(FullResourcePath,'graphic', 1); if (!x.exists) ReportError("Graphic not found: " + FullResourcePath); var result = []; for (var i=1; i<=x.countPages; i++){ x.pagenumber = i; result.push(x.content); } Print("Result is: " + result); return result.join('<p>\n'); Edited January 11, 2016 by step can not type today. Quote Link to comment Share on other sites More sharing options...
JonBowman Posted January 11, 2016 Share Posted January 11, 2016 That worked! Thank you, Jon 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.