Jump to content

step

Registered Users - Approved
  • Posts

    962
  • Joined

Everything posted by step

  1. I haven't tested this myself but you could give this a try: for (var i in FusionPro.Fields) FusionPro.Composition.AddVariable(i, ReplaceSubstring(Field(i), /\$0?|^0*|\.0{2}|%/g, "", true));
  2. Paste this into the js file: FusionPro.RuleTemplates["IMB"] = { description: "Returns formatted IMB Field", syntax: "// Change field name to match your data.\n" + "return \'<f name=\"USPSIMBStandard\"><z newsize=\"16\">\' + Field(\"Intelligent Mail barcode\");" + "\n", istext:1, isgraphic:0 }
  3. return '<f name="USPSIMBStandard">[color="Red"]<z newsize="16">[/color]' + Field("Intelligent Mail barcode");
  4. Give this a shot: var s = Field("Your Field Name"); return s.replace(/"(\w|\d)/g,'&ldquor;$1').replace(/(\w|\d)"/g,'$1&rdquor;'); Make sure that "Treat returned string as tagged text" is checked in the text frame you apply it to. Hope that helps!
  5. Honestly, I'm not sure what the pros and cons are for SmartStream – we primarily use FusionPro for all of our variable data. I know the basic functionalities of SmartStream and really only use it to determine whether the problem is with FP or with the press.
  6. What version of FP are you running? We encountered issues with jlt output to our indigos as well with version 8 and have since been running jobs as PPMLs. If it's earlier than the 8.0 release, I'd check how you've loaded the IDAutomationC128M font to your rip. When you load barcodes to the indigo, make sure that the font size you're using is specified in the font size list, kerning is off, and the character set is "windows." Additionally, to narrow down the problem, I would try to recreate the job using HP's variable solution (SmartStream Designer) just to determine if it is in fact a FP issue or an issue with your press. Last ditch effort, I'd create a PDF or a PPML file out of FP to move the job along.
  7. What do you mean by "fixed length files"? Can you attach a sample to this post to better understand the issue that you're having?
  8. Is your FusionPro template already imposed? I would make your FP template an 8.5x11 and set up an FPI file that imposes the job 2 up on an 11x17 sheet in telescoped stacks. Then tell FP to output in 1,000 record chunks.
  9. You need to make sure that "treat return strings as tagged text" is checked in the text box
  10. I'm not Dan, but I think this modification should work for you: for (var i in FusionPro.Fields) FusionPro.Composition.AddVariable(i, ReplaceSubstring(Field(i), "blank", "[color="Red"]<color name=\"White\">blank</color> [/color]"));
  11. Is it possible to determine whether a text frame of a certain name exists? I'm populating (via OnRecordStart) a series of text frames with variable information and if the text frame doesn't exist for a version, I don't want FP to attempt to assign content to it. I realize that this won't be an issue during composition but I'm mainly asking in order to not get errors at validation. Here's what I'm trying to do: (FindTextFrame("Rate1_" + Field("version")).exists) ? FindTextFrame("Rate1_" + Field("version")).content = Field("rate1") : ""; (FindTextFrame("Rate2_" + Field("version")).exists) ? FindTextFrame("Rate2_" + Field("version")).content = Field("rate2") : "";
  12. I'm guessing that this change needs to be made so that there isn't conflicting information for the x position of the "J (For only)" text box: if ((Right("Price-2for"),2) == "00"); return { FindTextFrame("K (Price n for)").x = 8776 FindTextFrame("K (Price n for)").y = 6235 FindTextFrame("J (Qty n for)").x = 3996 FindTextFrame("J (Qty n for)").y = 4053 FindTextFrame("J (For only)").x = 8374 [color="Red"]FindTextFrame("J (For only)").y = 4025[/color] }
  13. Does the code that I wrote for dreimer not solve your problem?
  14. Edit the return line: return (result.length>2) ? result.join(", ").replace(/^(.*)(, )(.*?)$/, "$1, and $3") : result.join(", ").replace(/^(.*)(, )(.*?)$/, "$1 and $3");
  15. In regards to your first question, Try this: var contact = [["phone:",Field("phone")],["mobile:",Field("mobile")],["fax:",Field("fax")]]; var result = []; for(var i=0; i<3; i++){ if (contact[i][1] != "") { result.push(contact[i].join(" ")); } } return result.join(", ") In regards to your second question: if (!Array.prototype.filter) { Array.prototype.filter = function(fun /*, thisp */) { "use strict"; if (this == null) throw new TypeError(); var t = Object(this); var len = t.length >>> 0; if (typeof fun != "function") throw new TypeError(); var res = []; var thisp = arguments[1]; for (var i = 0; i < len; i++) { if (i in t) { var val = t[i]; // in case fun mutates this if (fun.call(thisp, val, i, t)) res.push(val); } } return res; }; } var contact = [["phone:",Field("phone")],["mobile:",Field("mobile")],["fax:",Field("fax")]]; var result = []; for(var i=0; i<3; i++){ if (contact[i][1] != "") { result.push(contact[i].join(" ")); } } return result.join(", ").replace(/^(.*)(, )(.*?)$/, "$1 and $3");
  16. I think this might work for you: var result = [Field("phone"),Field("mobile"),Field("fax")]; for(var i=0; i<3; i++){ if (result[i] == "") { result.splice(i,1); i--; } } return result.join(", ");
  17. I thought I remembered seeing somewhere on the forum that it is possible to control the width, height, and position of a text or graphic frame on a per record basis via the OnRecordStart callback in FP8. Can someone expand on that? Or think of some way I could achieve that? Here's my scenario: I have variable disclaimer copy that moves per version but it uses the same rules. What I am envisioning is something like this: var xPos = Field("xPos"); var yPos = Field("yPos"); var width = 6; // width in inches var height = 1; // height in inches FindTextFrame("disclaimer",xPos,yPos,width,height,).content = Field("disclaimer");
  18. Kim, we've had similar issues with the jlyt format at our presses as well. We've been able to migrate to PPML using the PPML settings as opposed to the HP PPML settings. This setting creates a .zip file that contains the PPML file as well as the supporting resource files that go along with the job. Drop the support files into the "images" subfolder of the hot folder and then drop the PPML file into the root of the hot folder. This has been the working solution for us.
  19. No, that feature was not added to the latest version of FP and I don't get the impression from the prior posts that they had/have any intention of doing so. However, with the latest version of the software, you are capable of accomplishing everything discussed in thread - including the arbitrary chunking of reprint records via JavaScript coding.
  20. It sounds like you want to use an inline graphic. I would create a text box and place it below the two mandatory numbers and set the contents of that text box to this rule: return (Field("Cell") != "") ? '<graphic file="Cell Label.jpg" height=1000>' + Field("Cell") + '<graphic file="Email Label.jpg" height=1000>'+ Field("email") : '<graphic file="Email Label.jpg" height=1000>' + Field("email") ; Basically, it's an if/then statement that will check to see if your "Cell" field is populated. If it is, then it returns a Cell label followed by a cell number, an email label, and the email address. If it's not, then it just returns an email label and the email address.
  21. Try this: return (Field("Phone3") != "" && Field("Phone4") != "") ? Resource("Email Graphic") : Resource("Cell Graphic");
  22. Sure: var s = Field("YOUR FIELD NAME"); // replace with your field return s.replace(/\$/g,"<superscript>$</superscript>");
  23. the "g" makes the change globally. If the dollar amount were to contain more than 1 comma, it would remove all of them. Glad that worked for you!
  24. Paul, have you heard back from support about this issue? I have experienced similar font problems with 8.1.2 and was wondering if they were able to help you reach a resolution.
×
×
  • Create New...