Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Creator

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 22nd, 2014, 12:26 PM
JorgeP JorgeP is offline
Junior Community Member
 
Join Date: Jun 2009
Posts: 23
Default multiple open output streams

I want to compose all the single page records to one print file, all the two page records to another print file and all the three page records to yet another print file.

Can this be done simultaneously? appending to each output stream as I go

Currently I am bringing in multipage pdf's and checking the number of pages and skipping the record if it doesn't match up to a variable I have set but that means I have to compose the same data file three times to make sure I have covered all the possibilities for this job.

Other option, can I set a varpages =1 to look for single pages, proceed through data file and create first print file, then increment varpages at last record run the process again without having to do it manually..?

Thanks for your help
Reply With Quote
  #2  
Old September 23rd, 2014, 07:40 PM
David Miller David Miller is offline
Senior Contributor
 
Join Date: Oct 2008
Location: Hamden, CT
Posts: 266
Default Re: multiple open output streams

Quote:
Originally Posted by JorgeP View Post
...Can this be done simultaneously? appending to each output stream as I go...
I don't think you can actually "append to each output stream". But, I suggest looking at Dan's post here.

Not sure if I understand your question in it's entirety.
__________________
David Miller
FusionPro VDP Creator 12.0.3
Adobe Acrobat Pro 2021
macOS Big Sur 11.6.2

Last edited by David Miller; September 23rd, 2014 at 07:43 PM..
Reply With Quote
  #3  
Old September 24th, 2014, 10:40 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,694
Default Re: multiple open output streams

Yes, you can use "dynamic chunking," as described here, among other places. However, this requires that the input data file is sorted into groups of records corresponding to the separate output files. If your input file is not sorted in this way, then you can still open up a new output file whenever you want, but you can only have one output file open at a time.

We have been considering an option to "auto sort" the data file, so that the necessary sorting can be done in memory by FusionPro with a pre-processing step, so that you can achieve this kind of "grouping" of input data records into separate output files without having to pre-sort the input file. (We could also do this for external data files, to make lookups faster.)

The other wrinkle with your specific requirement is that you're not chunking/grouping records by a data field, but by the number of pages in a PDF resource.

What you mention in your post could work, where you would hard-code a particular number of pages to look for, then in OnRecordStart, you can see whether the actual number of pages in the resource associated with that record matches that value, then skip any records that don't match that number of pages by setting FusionPro.Composition.composeThisRecord = false. But you would need to run multiple compositions, changing that number of pages variable each time, to get all of your output.

The other thing I can think of, which is more complicated to code in JavaScript, but would allow you to output all of the records from a single composition run, would be to read in the data file as an ExternalDataFileEx in OnJobStart, and then set your main input source to None and set the records to compose from 1 to say, 5, or whatever the highest possible number of pages is. Then, in OnRecordStart, you would iterate through all of the records in the (now "external") data file, find all the ones which match FusionPro.Composition.inputRecordNumber, add them to an Array, then set FusionPro.Composition.inputRecordNumber to the number or records in the Array, then use the FusionPro.Composition.inputRecordNumber property to access each one. It's definitely possible to do this, but it is complicated. If you want to try it yourself, I could help a bit, but the amount of custom JavaScript coding is beyond what I can just do for you in the context of this forum. So you may want to contact our Sales team to inquire about custom (paid) template-building.
__________________
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)});

Last edited by Dan Korn; September 24th, 2014 at 03:41 PM.. Reason: changed link to absolute URL
Reply With Quote
  #4  
Old September 24th, 2014, 02:06 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,694
Default Re: multiple open output streams

Another option may be to output each record to its own file, but to have the files grouped into folders, with logic similar to my post here:
http://forums.pti.com/showthread.php?p=15494#post15494
Where you could set the folder name based on the number of pages.
__________________
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 September 24th, 2014, 03:12 PM
David Miller David Miller is offline
Senior Contributor
 
Join Date: Oct 2008
Location: Hamden, CT
Posts: 266
Default Re: multiple open output streams

Quote:
Originally Posted by Dan Korn View Post
Yes, you can use "dynamic chunking," as described here, among other places.
The link above is not working. I think the post can be found here.
__________________
David Miller
FusionPro VDP Creator 12.0.3
Adobe Acrobat Pro 2021
macOS Big Sur 11.6.2

Last edited by David Miller; September 25th, 2014 at 12:33 AM..
Reply With Quote
  #6  
Old September 24th, 2014, 03:43 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,694
Default Re: multiple open output streams

Quote:
Originally Posted by David Miller View Post
The link above is not working. I think it the post can be found here.
Thanks for catching that. Those relative URL links used to work, but something seems to have changed here that breaks them. I'll look into that further, but I edited my post above to use an absolute URL.
__________________
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 October 6th, 2014, 07:14 AM
JorgeP JorgeP is offline
Junior Community Member
 
Join Date: Jun 2009
Posts: 23
Default Re: multiple open output streams

I think the external data file option would work, I will give it a shot.

Thanks,

Jorge
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 03:50 AM.


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