Jump to content

How to output Multiple data files?


Tony Olivas

Recommended Posts

Right now I compose one file at time then change the data file rename the output file then hit compose. So that as soon as it finishes the other one starts. I repeat the same process over and over. Kinda of tedious!

 

I'm trying to find logic/script to deal with multiple data files then output composed files(PDF) with the name of the data file.

 

I found this logic and manipulated it how I think it should work.

 

externalDF = new ExternalDataFileEx('/Users/tony/Desktop/Gold 2012/Data/POD-DOM-GRA-V1-1.txt', ',');

 

or maybe it should loop like Dan Korn's logic:

var result = "";

for (var i = 1; i <= ID_Numbers.recordCount; i++)

{

if (ID_Numbers.GetFieldValue(i, "ID") == Field("ID"))

{

result += ID_Numbers.GetFieldValue(i, "Name") + ", " +

ID_Numbers.GetFieldValue(i, "Location") + ", " +

ID_Numbers.GetFieldValue(i, "Date");

}

}

return result;

 

How do I define ID numbers? Insert the path of the Data on my desktop?

Edited by Tony Olivas
Adding rule
Link to comment
Share on other sites

  • 2 years later...
Did you ever get an answer on this? If you did, I would appreciate it if you would let us know how you resolved this.

Hi Jamie,

 

I'm assuming that your question doesn't really have much to do with the code that Tony posted (which also doesn't have much to do with his question, since he was greatly confused, but I assume that Tony either figured something else out or moved on since 2012).

 

So let's start over. What specifically are you trying to do?

 

Are you trying to output one file for each record from your input data file? If so, all you need to do is check the "Output to multiple files" box on the Output tab of the Composition Settings dialog and set the number of records per file to 1.

 

Or are you trying to do something else? If so, please explain in detail.

Link to comment
Share on other sites

Dan,

 

What Tony said is what I need to do.

"I'm trying to find logic/script to deal with multiple data files then output composed files(PDF) with the name of the data file."

 

I have a customer that I output 89 pdf files for. I am currently changing the input data file and composing. I do have code in the On Job Start section:

 

return FusionPro.Composition.outputFileName = Left(GetFileName(FusionPro.Composition.inputFileName),(Len(GetFileName(FusionPro.Composition.inputFileName))-3)) +

FusionPro.Composition.outputFormatExtension;

 

This is naming the output pdf file with the input file name, and works great!

 

what I am looking to do is compose a job that will:

 

Compose input file 1.txt - and name the output the same name as the input file.pdf then change the input file to input file 2.txt and name it the same as the new input file.pdf. I need it to progress through all 89 files.

 

Is there a way to do something like:

 

//FusionPro.Composition.inputFileName = '\\\\PRODUCTION28\\FPServer\\Tribune\\_FusionPro\\Plastic Card - 8_625 x 3_75\\W2LIVE\\7TX\\27618-SLNOVPCW2-TX_1.TXT'

 

in the On Job End and make it compose again, until all of the input files are processed?

 

Thank You

 

Jamie Powers

Link to comment
Share on other sites

What you're really trying to do is compose a batch of data files, in an automated way. This can't really be done easily in FusionPro VDP Creator/Desktop in Acrobat. But we do have a solution: a batch composition engine called FusionPro VDP Producer API (FP Server). That's really the appropriate technology to automate multiple compositions. Please see this page for more information:

http://marcom.com/solutions/fusionpro-server/

Or contact Sales at inquiries@pti.com.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...