Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > Getting Started > Sample Jobs

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 20th, 2008, 03:35 PM
RyanB RyanB is offline
Forum n00b
 
Join Date: Sep 2008
Location: Tucson, Arizona
Posts: 1
Default Where are the Sample Jobs?

I'm specifically looking for the sample which covers importing one PDF with varying page counts into a template.

I'm not looking for the sample which imports multiple PDFs into one template.

I have a cover letter which now needs each record's PDF appended after it.

Thanks in advance,
Ryan

FP Desktop 5.0P1b
Mac OS 10.4.11
Reply With Quote
  #2  
Old January 16th, 2009, 02:51 PM
Alex Marshall's Avatar
Alex Marshall Alex Marshall is offline
FusionPro VDP Support
 
Join Date: Sep 2008
Location: Chicago,Illinois
Posts: 380
Default Re: Where are the Sample Jobs?

Hello,
Are you asking how to import specific pages from a PDF document based on a specified page count in your data file? If so, read on.
You don't have to use the multi-page PDF as your input (template) PDF
document. Instead, you can use it as an external graphic resource, and
specify the desired pages with the FusionProResource.pagenumber
property. If you use inline graphics in a text frame with overflow
pages, you can insert a variable number of pages for each output record.
Here are the steps to take to accomplish this:
* Start with a new input PDF document. (You can start from a blank
one-page document by saving or printing a blank document to PDF from
another application.) The page size should be the same as in the PDF
from which you are including the pages.
* Define the data source for the document. (You can import from your
original input PDF.)
* Set a text frame that completely covers the page, starting at X and Y
of zero. You may need to extend the width and depth of the page by a
bit.
* Insert an Overflow page, duplicating the existing Body page. Set the
text frame as the overflow destination. (Check the "Overflow To" box on
the Text Frame palette.)
* Create a Text rule like the one below. Make sure to check the "Treat
returned strings as tagged text" box.
* Edit the text of the frame on the Body page to include the rule
variable. Set the point size of the variable to 1.
* Set the Overflow options for the Body page to overflow to your
Overflow page (in the "New Left Page" drop list). Leave "New Right
Page" as "(None)" and set the add page mode to "As Few Added Pages As
Possible."
Here is an example of the kind of rule you need:
// MODIFY THESE TO MATCH YOUR DATA
var PDFResourceFile = "myfile.pdf";
var FirstPageNumber = Int(Field("firstpagenumber"));
var FirstPageCount = Int(Field("firstrepeatcount"));
var SecondPageNumber = Int(Field("secondpagenumber"));
var SecondPageCount = Int(Field("secondpagecount"));
var result = "";
var pdf = new FusionProResource(PDFResourceFile, "graphic");
pdf.pagenumber = FirstPageNumber;
for (var i = 1; i <= FirstPageCount; i++)
result += pdf.content + "\n";
pdf.pagenumber = SecondPageNumber;
for (var i = 1; i <= SecondPageCount; i++)
result += pdf.content + "\n";

return result;
This assumes that you have data fields specifying the page numbers and
repeat counts for each. You may have to play around a bit with the size
of the frames, but this should work.
Reply With Quote
  #3  
Old November 11th, 2013, 03:59 PM
esmith's Avatar
esmith esmith is offline
Senior Contributor
 
Join Date: Oct 2008
Location: Charlotte, NC
Posts: 870
Default Re: Where are the Sample Jobs?

Quote:
Originally Posted by fern View Post
Well I followed your instructions and received an error message: "Failed to open file </Volumes/BlueEarthShared?vivian/7079 ESCORT CARD/ESCORT CARD list.txt>.
Quote:
Originally Posted by Alex Marshall View Post
what if you renamed the folder and remove the question mark "?" indicated in the path: "BlueEarthShared?vivian"
I don't see your confirmation that you renamed your path so that you're not using symbols. I'd go a step further and (temporarily) put your data file and FP template in the same folder/directory and try to link template to data that way. If that works, your initial problem may be network-related rather than FusionPro-related.

If that doesn't work, perhaps you could post your template and a stripped down version of your data to see if a user has the same issue on our machine.
__________________
Eric Smith
Content Developer
Classic
FP 9.3.6, MAC OSX 10.9.4, Acrobat 11.0.09
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 11:40 AM.


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