|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I have a simple callback rule for onNewOutputFile Code:
newFileExt = FusionPro.Composition.JobOptions["OutputFormat"]; switch (newFileExt){ case "Indigo PPML": newFileExt = ToLower("." + "PPML"); break; case "PostScript": newFileExt = ToLower("." + "ps"); break; case "Digimaster": newFileExt = ToLower("." + "ps"); break; case "Single-File VPS": newFileExt = ToLower("." + "vps"); break; case "Multi-File VPS": newFileExt = ToLower("." + "vps"); break; case "PDF": newFileExt = ToLower("." + "pdf"); break; default: newFileExt = ToLower("." + newFileExt); break; } FusionPro.Composition.outputFileName = ReplaceFileExtension(GetFileName(FusionPro.Composition.inputFileName), newFileExt); Print("Replacing the output filename with the input filename:"); Print("Input file name is " + GetFileName(FusionPro.Composition.inputFileName)); Print("Output filename is " + FusionPro.Composition.outputFileName); I tried to experiment just putting a simple print function in onNewOutputFile Code:
Print("Hello world!"); My other solution is put my code in onJobStart but it gives me an error when I try to preview my pdf. Can you explain the changes from 7.1 to 7.2? |
#2
|
||||
|
||||
![]()
OnNewOutputFile gets called only when a new output file (chunk) is being created. Do you have the "Output to multiple files" box checked on the Output tab of the Composition Settings dialog?
Also, FusionPro 8 introduces arbitrary chunking, where you can open up a new output file at any time, and give the file a name, all in a single call to FusionPro.Composition.OpenNewOutputFile. It also includes a new FusionPro.Composition.outputFormatExtension property which could replace the entire switch statement in your rule.
__________________
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)}); ![]() |
#3
|
|||
|
|||
![]()
I don't have output to multiple files selected because the data is split into several files already.
Can you explain about the preview error I got when I place my code in onJobStart? |
#4
|
||||
|
||||
![]() Quote:
In any case, the code you posted works fine for me in 7.1, 7.2, and 8.0. Quote:
Code:
if (!FusionPro.Composition.isPreview) { // ... code to change the output file name here ... }
__________________
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
|
|||
|
|||
![]()
I did you suggestion to use the FusionPro.Composition.IsPreview on onJobStart callback but I got an error when I try previewing my job. I thought that would solve my problem. I am thinking another way to do it by putting the code in onNewOutputFile and click to split file with some huge number bigger than the number of record in the file. I didnd't test it yet.
This is my code below Code:
if(!FusionPro.Composition.IsPreview){ newFileExt = FusionPro.Composition.JobOptions["OutputFormat"]; inputFileName = GetFileName(FusionPro.Composition.inputFileName).split("."); switch (newFileExt){ case "Indigo PPML": newFileExt = ToLower("." + "PPML"); break; case "PostScript": newFileExt = ToLower("." + "ps"); break; case "Digimaster": newFileExt = ToLower("." + "ps"); break; case "Single-File VPS": newFileExt = ToLower("." + "vps"); break; case "Multi-File VPS": newFileExt = ToLower("." + "vps"); break; case "PDF": newFileExt = ToLower("." + "pdf"); break; default: newFileExt = ToLower("." + newFileExt); break; } FusionPro.Composition.outputFileName = ReplaceFileExtension(GetFileName(inputFileName[0]), newFileExt); } |
#6
|
||||
|
||||
![]()
Sorry, it seems that I'm not very good at guessing exactly what error you got. Can you be more specific?
__________________
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
|
|||
|
|||
![]()
When I use the checkbox to enable my preview to turn my preview on, the checkbox is flickering on and turn back off in less than 1 sec. I don't get my preview.
Another occasion, I got an error box pop-up on the screen telling about some temporary file. I didn't catch the screen capture on that moment. I checked the temporary file, it was a file that FusionPro created to displaying the live preview on screen. |
#8
|
||||
|
||||
![]() 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)}); ![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|