Go Back   MarcomCentral (PTI) and FusionPro User Communities > Support > Issues, Questions, Etc.

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 2nd, 2015, 11:42 AM
Albert Albert is offline
Forum n00b
 
Join Date: Jul 2010
Posts: 4
Default Insert PDF file

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
Reply With Quote
  #2  
Old April 2nd, 2015, 11:50 AM
Alex Marshall's Avatar
Alex Marshall Alex Marshall is offline
FusionPro VDP Support
 
Join Date: Sep 2008
Location: Chicago,Illinois
Posts: 380
Default Re: Insert PDF file


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.
Reply With Quote
  #3  
Old May 5th, 2015, 12:19 PM
adam1991 adam1991 is offline
Forum n00b
 
Join Date: Mar 2009
Posts: 7
Default Re: Insert PDF file

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?
Reply With Quote
  #4  
Old May 5th, 2015, 12:35 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,305
Default Re: Insert PDF file

Quote:
Originally Posted by adam1991 View Post
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.
Quote:
Originally Posted by adam1991 View Post
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.
Quote:
Originally Posted by adam1991 View Post
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.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #5  
Old November 23rd, 2015, 10:25 AM
Stack's Avatar
Stack Stack is offline
Regular Contributor
 
Join Date: Oct 2008
Location: Annapolis Junction, MD, USA
Posts: 105
Default Re: Insert PDF file

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:

Code:
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?


Quote:
Originally Posted by Alex Marshall View Post
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.
Reply With Quote
  #6  
Old November 24th, 2015, 10:01 AM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,305
Default Re: Insert PDF file

Quote:
Originally Posted by Stack View Post
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.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #7  
Old November 24th, 2015, 10:14 AM
Stack's Avatar
Stack Stack is offline
Regular Contributor
 
Join Date: Oct 2008
Location: Annapolis Junction, MD, USA
Posts: 105
Default Re: Insert PDF file

Quote:
Originally Posted by Dan Korn View Post
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!
Reply With Quote
  #8  
Old January 9th, 2016, 04:54 PM
JonBowman JonBowman is offline
Forum n00b
 
Join Date: Dec 2015
Location: Winston-Salem, NC
Posts: 4
Default Re: Insert PDF file

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?
Reply With Quote
  #9  
Old January 11th, 2016, 06:46 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Insert PDF file

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:
Code:
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.replace(/<p>\\n$/,'');
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn

Last edited by step; January 11th, 2016 at 08:27 AM..
Reply With Quote
  #10  
Old January 11th, 2016, 08:10 AM
JonBowman JonBowman is offline
Forum n00b
 
Join Date: Dec 2015
Location: Winston-Salem, NC
Posts: 4
Default Re: Insert PDF file

Ste,

When I add the code in read I get the error TypeError: pdfString.join is not a function.

Jon
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:04 PM.


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