Jump to content

jmerrick0657

Registered Users - Approved
  • Posts

    39
  • Joined

Converted

  • FusionPro Products
    No

jmerrick0657's Achievements

Contributor

Contributor (5/14)

  • First Post Rare
  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

10

Reputation

  1. I'm trying to allow the user to select the label for a phone number they want to appear in a QR code using a field, however I'm having trouble getting the QR code to use the contents of the field. The entire rule I'm using is below for reference, however the line I'm trying to figure out is : "TEL;type=Toll Free": Field("TollFree"), This seems to work fine and displays the label as Toll Free, then the number correctly. However I'm trying to change it to something like this: "TEL;type=' + Field('C1Label') + '": Field("TollFree"), With that it is displaying the literal string ' + Field('C1Label') + ' I'm guessing it has to do with using different single / double quotes to delineate what should be interpreted as JavaScript vs displayed as literal text but I can't quite figure it out. Any help would be appreciated! -Jake Merrick Entire rule: //Function to Make a QR code without truncating font size function MakeQRBarcodePreciseSize(DataToEncode, ProcessTilde, EncodingMode, ErrorCorrection, PreferredFormat, PointSize, NoFontTag, Font) { var encoded = EncodeQRBarcode(DataToEncode, ProcessTilde, EncodingMode, ErrorCorrection, PreferredFormat, PointSize, NoFontTag, Font); var ReplacedBR = ReplaceSubstring(encoded, "\r\n", "<br>"); var ReplacedSpaces = ReplaceSubstring(ReplacedBR, " ", ""); if (isNaN(PointSize)) return ReplacedSpaces; var WithPointSize = "<z newsize=\"" + Number(PointSize) + "\">" + ReplacedSpaces; if (NoFontTag) return WithPointSize; var WithFontTag = "<f name=\"" + Font + "\">" + WithPointSize; return WithFontTag; } // vCard 3.0 format // http://en.wikipedia.org/wiki/vCard var info = { N: ToTitleCase(Field("LastName")) + ';' + ToTitleCase(Field("FirstName")) + ';;;;', FN: ToTitleCase(Field("FirstName")) + ' ' + ToTitleCase(Field("LastName")), TITLE: ToTitleCase(Field("Title1")), "TEL;type=Phone": Field("Phone"), "TEL;type=Toll Free": Field("TollFree"), EMAIL: ToLower(Field("Email")), URL: "innovativeos.com", } var result = ["BEGIN:VCARD", "VERSION:3.0"]; for (var label in info) { if (info[label]) result.push(label + ":" + info[label]); } result.push("END:VCARD"); var EncodingMode = "Byte"; var ErrorCorrectionMode = "M"; var PreferredFormat = "0"; //ONLY USE 1 POINT AFTER DECIMAL OR LEADING WILL NOT WORK CORRECTLY var PointSize = "3.4"; var NoFontTag = false; var Font = "IDAutomation2D"; var ProcessTilde = false; // COPYFIT QR CODE // function CopyfitLineWithMagnifyTag(line, widthInPoints, AllowToExpand) { var tm = new FusionProTextMeasure; tm.CalculateTextExtent(line); if (tm.messages) ReportError("CopyfitMagnifyLine: " + tm.messages); if (tm.textWidth < widthInPoints*100 && !AllowToExpand) return line; var factor = Round(widthInPoints / tm.textWidth * 10000, 0) - 1; return "<magnify type=pointsize factor=" + factor + ">" + line + "</magnify>"; //this horizontally scales type, to proportional scale type change "type=setwidth" to "type=pointsize" } var textFrameWidth = FindTextFrame("QRBox").GetSettableTextWidth() / 100; //change "ContactBox" to the name of the text frame return CopyfitLineWithMagnifyTag( '<p br=false linespacing=".833333">' + MakeQRBarcodePreciseSize(result.join(Chr(13) + Chr(10)), ProcessTilde,EncodingMode, ErrorCorrectionMode, PreferredFormat,PointSize, NoFontTag, Font), textFrameWidth);
  2. I have a job that is using 2 data sources; a multi-line data source and a single line presorted address list. Since I can't use a secondary data source as multi-line, I'm using the presorted mailing list as the secondary data source. I got everything to work correctly, however FusionPro is getting the output order from the primary data source. Is there any way to get it to output using the order from the secondary data source? I'm using 11.2.1
  3. I have about 30 FusionPro documents (and growing) that all use the same list of addresses. I put a for loop in the OnRecordStart rule that cycles through the list and assigns the addresses to different variable to be used throughout the document. All of these FusionPro documents are hosted on a web to print system; so when there is a change to the address list I end up going through each of the files, update the loop, collect, and re-upload into my web to print system. Is it possible to reference an external text file and insert the contents into a rule? I'm thinking if I can put the for loop in a text file on my web server and somehow reference it via URL in my OnRecordStart rule, I would only need to update the text file on the web server, and the 30 documents would automatically be updated without having to do anything to them individually. Thanks, Jake Merrick
  4. Thanks Scott! That was exactly what I was trying to do.
  5. I'm trying to force formatting on an email address. What my customer wants is First.Last@CassiaLife.org I sort of got this to work, so if I enter first.last or first.last@whatever.com it will return the correct result: var str = Field("email"); var firstletter = Left(Field("email"),1); firstletter = ToUpper(firstletter); var letterposition = Field("email").indexOf(".")+1 var letter = Mid(Field("email"),letterposition+1,1); letter = ToUpper(letter); var front = str.substr(1,str.indexOf(".")); var length = Field("Email").length - letterposition; var back = Mid(Field("Email"),letterposition+2,length-1); var fixed = firstletter + front + letter + back; var str = fixed; var newstr = str.substr(0,str.indexOf("@")); if (Field("Email") != '') { if (newstr != "") return newstr + "@CassiaLife.org"; else return fixed + "@CassiaLife.org"; } else return '' However I'm running into two issues: 1. The code seems kind of clunky (I'm not a Javascript expert by any means) 2. It only works on the character after the first period. While I doubt that anyone would have more than one period, it would be nice if I could figure out a way to account for that possibility.
  6. Dan, Collected files attached. It is the field CellFax (the rule DispayCellFax displays it); when set to "Y" it displays the cell and and fax on the same line and the baseline looks right, if set to "N" it displays them on two lines and the baseline shifts. Thanks for looking at it, Jake Merrick Fusion Pro.zip
  7. There is plenty of space (at least 3 text lines), so I don't think that is the issue. Thanks, Jake
  8. I have a text box where that is aligned to the bottom (lower box with address in the attached image), it is supposed to be aligned to the blue guide (see attached file correct.jpg). I have a rule that changes whether the 2 phone numbers display on one line or two based on user input; when the phone numbers display on 2 lines the baseline shifts up (see attached file incorrect). I can't figure out why this is happening, has anyone seen this before? Thanks, Jake
  9. I have a job where I need to have a logo that is inline with some text. In the past I have simply put a rule to return the graphic inside the text box so that it flows with the text. However for this one the user is uploading their logo so I would need to resize it proportionally to be no larger that a certain size. Anyone know how this might be accomplished? Thanks, Jake Merrick
  10. I have some text that I have set to be small caps and underlined, however when I look at the output the underline is thicker underneath the first letter of each word, then gets thinner under the small cap remaining letters in the words. Is there any way to make the underline the same thickness on all letters that are being underlined? Thanks, Jake Merrick
  11. Dan, Thanks for all the help, I'll reach out to support about the custom template building.
  12. Dan, Sorry I wasn't clear. It sounds like what I am trying to do is not possible. It would be to take the CMYK values that the user inputs and use that as a fill color of a box at 50% transparency so the static image underneath shows through. Thanks, Jake Merrick
  13. Dan, Thanks. Unfortunately that won't work in this case. I'm having the user input CMYK values, so I won't know all the color options. There is no way to make a box transparent, right? Thanks, Jake Merrick
  14. Is it possible to have a box with a transparent background? I have a static background image that has a semi-transparent box with a solid color background covering part of the background image. I would like the user to be able to select the color of transparent box that is in front of the background image. Thanks.
×
×
  • Create New...