#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]() Quote:
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.. |
#3
|
||||
|
||||
![]()
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 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 |
#4
|
||||
|
||||
![]()
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 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)}); ![]() |
#5
|
|||
|
|||
![]() Quote:
__________________
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.. |
#6
|
||||
|
||||
![]() Quote:
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral 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)}); ![]() |
#7
|
|||
|
|||
![]()
I think the external data file option would work, I will give it a shot.
Thanks, Jorge |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|