#1
|
||||
|
||||
![]()
Does the OnCopyfit callback work differently when composing on the server (via command line) than it does when composing locally?
My OnCopyfit rule looks like this: Code:
if (!Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72))) { ReportWarning("Could not copyfit text in flow " + FusionPro.Composition.CurrentFlow.name); } Quote:
Code:
if (!Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72))) { Print("doesn't fit"); } else { Print("fits"); } Quote:
Code:
if (!Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72))){ var warning = "Could not copyfit text in flow " + FusionPro.Composition.CurrentFlow.name; ReportWarning(warning); FusionPro.Composition.LogXMLMetadata('copyfit',warning); }
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#2
|
||||||||
|
||||||||
![]() Quote:
Quote:
Quote:
Quote:
Or perhaps there's something different about the way the fonts are handled. You are using the Assets.dat file for the Server composition, right? Either way, at the end of the day, both output files should look the same, and your text simply doesn't fit, and that's really all that matters, right? But it's also true that you're going to have the best results if the versions of FusionPro on your Desktop and Server machines are at least the same major version. Quote:
Now, the ReportError function is a bit different. That still only writes to the main log file, but it does set a Medium error severity level for the record. We'll come back to that in a bit... Quote:
The "status" attribute of the <record> tag that gets reported for each record is actually an error severity level, which corresponds to the values in the "Abort on errors of this type" drop-down list on the Advanced tab of the Composition Settings dialog (where 1=Severe, 3=Medium, 5=Minor). Speaking of which, that brings us to what it seems you're really trying to accomplish, which is to treat a record with a fitting failure as an error record: Quote:
And you want to fail the record in that case, right? That can be done with that "Abort on errors of this type" drop-down, and the other drop-down right below it. Set the first drop-down to "Minor" or "Medium", and the other to "Skip the record with error." Then you don't really need to log any specific message to the XML file like this to know that the record was bad: Quote:
You can still write the metadata to the XML log if you want to, but it's already designed to do what you want, with those error-handling settings on the Advanced tab. However, as I mentioned earlier, the ReportError function, while still not writing its message to the XML log, does set an error level for the record. So if you call that, it will set the error level to Medium, which will also cause the record to abort if you have it set to do so. The other thing you can do, in FusionPro 9.2 or later, is call FusionPro.Composition.Abort. This takes three parameters, all optional:
Note also that, if any records are skipped/aborted with an error, either via the error level from the Advanced tab or with a call to FusionPro.Composition.Abort, FusionPro also creates a "bad record" file (with the same name as the output file, but with "-bad" and the input file extension at the end) to contain all the records which failed. (The idea here is that you can easily see which records were bad, or even re-compose the job again with just those records and their data.) So you should be able to use one of more of these strategies for "bad" record handling, without having to write a custom message to either log file. That all said, if you want to collect up the job and post it, I can take a look and see why copyfitting isn't working as expected.
__________________
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
|
|||||||
|
|||||||
![]()
Thanks for the reply, Dan.
Quote:
What? It printed "fits" right above the message telling me it doesn't fit. So, that made me think it always validated as true on the Server. Quote:
Code:
C: CD C:\Program Files (x86)\PTI\FusionPro\ FusionPro "\\server\path\to\templates\test\data.csv" "\\server\path\to\templates\test\test.dif" "\\server\path\to\templates\test\test-o.cfg" "\\server\path\to\templates\test\output.pdf" Quote:
Quote:
Quote:
Quote:
Quote:
Anyway, again, thanks for the feedback and the ideas. I have been working on a test file to upload to the forum (the actual file is very large and contains a bunch of customer sensitive data that I don't feel comfortable uploading) but I haven't been able to reproduce the problem. Which...I guess is good? Now I just have to figure out what it is about my actual template that's different from my testing one.
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#4
|
||||||||||
|
||||||||||
![]() Quote:
Quote:
Quote:
Quote:
Sure. Some examples are: failed to open the input data file, or the format (DIF) file, or the CFG file; failed to write the output file; missing a graphic resource; and other various problems with malformed or missing files or resources. Quote:
Quote:
Yes. Most of the errors are "internal" and come from FusionPro itself. Quote:
Quote:
Quote:
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 | |
|
|