Jump to content

Search the Community

Showing results for tags 'javascript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome
    • Start Here!
    • News
  • Software-Related Talk
    • Documentation
    • Getting Started
    • The JavaScript Library
    • FusionPro® VDP Creator
    • FusionPro® VDP Producer
    • FusionPro® VDP Server (API)
    • FusionPro® Expression®
    • MarcomCentral®
  • Support
    • Issues, Questions, Etc.
    • Digital Workflow Documents
    • Fonts
  • Off Topic
    • Customer Polls
    • Job Board (Moderated)
    • Reviews, Rants, and General Musings

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Location


Occupation


FusionPro VDP software version


OS


Acrobat Version


Homepage


ICQ


AIM


Yahoo


MSN


Skype


User Title

  1. Here's a function I wrote to basically do what CopyfitLine does, using the <magnify> tag and a more efficient algorithm: 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=setwidth factor=" + factor + ">" + line + "</magnify>"; } The idea here is that we don't need to iterate until we find a size that fits; we can simply take the ratio of how big the line is already compared to the desired width and use that as the magnification factor. Note that you have to specify all the font and size information with tags. So a call would look something like this: return CopyfitLineWithMagnifyTag('<f name="Arial">' + '<z newsize=12>' + Field("Address"), 360); The caller can add the optional third parameter of "true" to allow the text to get bigger, like so: return CopyfitLineWithMagnifyTag('<f name="Arial">' + '<z newsize=12>' + Field("Address"), 360, true); This function could also be modified to take parameters specifying the font name and bold/italic faces.
  2. Is there anyone who knows a way to generate the Codabar barcodes with Javascript and the right font from ID-Automation? It is for a blood bank hospital who likes to have a 6 or 9 digits readable barcode with just numbers, generated with the Sequential numbering rule (without an excell file) Thanks in advance!
  3. Hi, I'm trying to return a file name from a graphic upload and I'm not sure where to start with this. Ideally, I'd like to just create a blank rule that says if Field (x) = "", return ""; else return "uploaded file name only" (not the image, as this will be in the graphic frame. Is this something doable?
  4. I am trying to create a banner with a few fields and some size changes based upon one of the fields. I have 3 sizes for banners (18x12, 60x30, 72x36) based upon the number of years selected 1-5 = 18x12 10-15 = 18x12 20-25 = 60x30 30+ = 72x36 With 3 layouts for the background Style 1 Style 2 Style 3 The field for "Years of service" is entered in manually while the background is based on a pick list of the 3 styles. I believe that OnRecordStart would be my best bet for this, but I'm not getting the result I was hoping for. I have set all pages to "Body, unused" and then I get no records to show. Originally I had all pages set to "Body" and each page displayed, which was not what I was looking for either. I couldn't find anything that was similar enough for me to build off of on the forum yet, so I decided to post my javascript here and maybe someone would be able to find out what I am missing. Thanks for the look and any and all help! var Background = Field("Background"); if (Field("Years of Service") >=1 && Field("Years of Service")<= 5) + Field("Background") == "Style 1"; return ("Style 1 18x12"); if (Field("Years of Service") >=10 && Field("Years of Service")<= 15) + Field("Background") == "Style 1"; return ("Style 1 18x12"); if (Field("Years of Service") >=20 && Field("Years of Service")<= 25) + Field("Background") == "Style 1"; return ("Style 1 60x30"); if (Field("Years of Service") >=30 + (Field("Background") == "Style 1")); return ("Style 1 72x36"); if (Field("Years of Service") >=1 && Field("Years of Service")<= 5) + Field("Background") == "Style 2"; return ("Style 1 18x12"); if (Field("Years of Service") >=10 && Field("Years of Service")<= 15) + Field("Background") == "Style 2"; return ("Style 2 18x12"); if (Field("Years of Service") >=20 && Field("Years of Service")<= 25) + Field("Background") == "Style 2"; return ("Style 2 60x30"); if (Field("Years of Service") >=30 + (Field("Background") == "Style 2")); return ("Style 2 72x36"); if (Field("Years of Service") >=1 && Field("Years of Service")<= 5) + Field("Background") == "Style 3"; return ("Style 3 18x12"); if (Field("Years of Service") >=10 && Field("Years of Service")<= 15) + Field("Background") == "Style 3"; return ("Style 3 18x12"); if (Field("Years of Service") >=20 && Field("Years of Service")<= 25) + Field("Background") == "Style 3"; return ("Style 3 60x30"); if (Field("Years of Service") >=30 + (Field("Background") == "Style 3")); return ("Style 3 72x36"); switch(Background) { case "Style 1 18x12": FusionPro.Composition.SetBodyPageUsage("Style 1 18x12",true); FusionPro.Composition.SetBodyPageUsage("Style 1 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 1 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 2 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 2 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 2 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 3 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 3 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 3 72x36",false); break; case "Style 1 60x30": FusionPro.Composition.SetBodyPageUsage("Style 1 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 1 60x30",true); FusionPro.Composition.SetBodyPageUsage("Style 1 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 2 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 2 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 2 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 3 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 3 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 3 72x36",false); break; case "Style 1 72x36": FusionPro.Composition.SetBodyPageUsage("Style 1 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 1 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 1 72x36",true); FusionPro.Composition.SetBodyPageUsage("Style 2 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 2 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 2 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 3 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 3 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 3 72x36",false); break; case "Style 2 18x12": FusionPro.Composition.SetBodyPageUsage("Style 1 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 1 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 1 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 2 18x12",true); FusionPro.Composition.SetBodyPageUsage("Style 2 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 2 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 3 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 3 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 3 72x36",false); break; case "Style 2 60x30": FusionPro.Composition.SetBodyPageUsage("Style 1 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 1 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 1 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 2 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 2 60x30",true); FusionPro.Composition.SetBodyPageUsage("Style 2 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 3 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 3 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 3 72x36",false); break; case "Style 2 72x36": FusionPro.Composition.SetBodyPageUsage("Style 1 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 1 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 1 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 2 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 2 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 2 72x36",true); FusionPro.Composition.SetBodyPageUsage("Style 3 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 3 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 3 72x36",false); break; case "Style 3 18x12": FusionPro.Composition.SetBodyPageUsage("Style 1 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 1 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 1 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 2 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 2 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 2 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 3 18x12",true); FusionPro.Composition.SetBodyPageUsage("Style 3 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 3 72x36",false); break; case "Style 3 60x30": FusionPro.Composition.SetBodyPageUsage("Style 1 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 1 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 1 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 2 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 2 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 2 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 3 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 3 60x30",true); FusionPro.Composition.SetBodyPageUsage("Style 3 72x36",false); break; case "Style 3 72x36": FusionPro.Composition.SetBodyPageUsage("Style 1 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 1 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 1 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 2 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 2 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 2 72x36",false); FusionPro.Composition.SetBodyPageUsage("Style 3 18x12",false); FusionPro.Composition.SetBodyPageUsage("Style 3 60x30",false); FusionPro.Composition.SetBodyPageUsage("Style 3 72x36",true); break; }
  5. Does anyone know the best way to check for a character? I'm looking for an apostrophe ( ' ) at the beginning of a variable (years attended) that are being input by csv. In single record they get typed in '12-'15 but when uploaded in batch, excel will sometimes remove the initial apostrophe (due to it being a command in the software). I'd like the rule to check for the apostrophe and return the variable if there is one and return ' + variable if there isn't. I am thinking that this would have to be an OnRecordStart rule, but other than that I am a little lost. Thanks for any and all help!
  6. I have a rule that looks at 2 fields to determine what to return. I'm getting a Javascript syntax error message on the following rule and for the life of me, I do not see it. if ((Rule("RuleEmailFirstName") != "") && Rule("RuleEmailLastName") != "")) return Rule("RuleEmailFirstName") + "." + Rule("RuleEmailLastName") + "@" + Field("Email Domain"); else if ((Rule("RuleEmailFirstName") != "") && (Rule("RuleEmailLastName") == "")) return Rule("RuleEmailFirstName") + "@" + Field("Email Domain"); else if ((Rule("RuleEmailFirstName") == "") && (Rule("RuleEmailLastName") != "")) return Rule("RuleEmailLastName") + "@" + Field("Email Domain"); else return ""; Will someone please help me and point out what I'm doing wrong?
  7. So I was able to come up with a good rule for On Record Start for a Name/Title field, but then had to add in a condition for the address as well. It worked perfectly fine until I added the address portion & now it will only use the 'long page', even when the 'short page' is supposed to be used. Is there something missing below? I've been racking my brain to figure out what is going on, but every time I validate, FusionPro returns 'Expressions Ok'. Thanks for the look. var name = Field("Name"); var title = Field("Title"); var nametitle = name + "," + title; if (nametitle.length <= 26){ FusionPro.Composition.SetBodyPageUsage("Short Name", true); FusionPro.Composition.SetBodyPageUsage("Long Name", false); } else{ FusionPro.Composition.SetBodyPageUsage("Short Name", false); FusionPro.Composition.SetBodyPageUsage("Long Name", true); }; var address = Rule("Format Address"); if (address.length <= 40){ FusionPro.Composition.SetBodyPageUsage("Short Name", true); FusionPro.Composition.SetBodyPageUsage("Long Name", false); } else{ FusionPro.Composition.SetBodyPageUsage("Short Name", false); FusionPro.Composition.SetBodyPageUsage("Long Name", true); }
  8. I've been working on a span statement & it works well. I need to change the color to a pantone (Pantone 638 CMYK) & I'm having an issue doing so. if (Field("Certification 1") == ""){ return ""; }else{ return "<span font=Wingdings>n</span>" + Field("Certification 1"); } I'm new to spans & have limited experience with them. I've tried adding 'font color = Pantone 638 CMYK' inside of the span but then the rule no longer works. Maybe I am just going about it all wrong? Thanks
  9. I have been trying to add a square bullet using a script in front of a field using; if (Field(“Certification 1”) == ""){ return ""; }else{ return "<p> ◻" + Field(“Certification 1”) + "</p>"; }* Is this format not supported? I'm still learning javascript & I may be a little lost with this. Has anyone else run into this?
  10. The JavaScript table object in FusionPro 7.0, new FPTable, must be declared at the beginning of a table, followed by the number of columns that the table will use. Columns are defined in 100ths of a point. The example below shows 4 columns that are each an inch wide. The number of rows can be added row by row, or at the beginning of the table. new FPTable; var myTable = new FPTable; myTable.AddColumns(7200, 7200, 7200, 7200); myTable.AddRows(2); At the end of the table, the MakeTags() function must be called: return myTable.MakeTags(); There are 2 ways to set content for the cells. The first row and column in a table is always 0. Text Fields, static type or even graphic images can be placed inside a cell: myTable.Rows[0].Cells[0].Content = "Hello"; myTable.Rows[0].Cells[1].Content = Field("FName"); myTable.Rows[0].Cells[2].Content = "Goodbye"; myTable.Rows[0].Cells[3].Content = Field("LName"); The second way is can also set the content of all the cells in an entire row like this: myTable.Rows[1].SetContents("Hi", Field("FName"), "Bye", Field("LName")); It is possible to copy content and formatting from one cell to another in a row. In the example below, the content is set into cell 2,0 and then copied into cells 2,1 / 2,2 / 2,3. myTable.Rows[2].Cells[0].Content = "Bon Jour"; myTable.Rows[2].CopyCells(0, 1,2,3); In this example, thin Black borders are applied to cell 0,0 and then copied to cells 0,1 / 0,2 / 0,3. myTable.Rows[0].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left"); myTable.Rows[0].CopyCells(0, 1,2,3); When copying the formatting of one cell to another, it is important to remember to set the content of the subsequent cells after the formatting is done (unless the content is also meant to be the same). The following pages show more examples of ways to format a cell. Shading: Two properties for Shading are Shade Color and Shade Percent. myTable.Rows[1].Cells[0].ShadeColor="Black"; myTable.Rows[1].Cells[0].ShadePct=20; There are two more properties for Shading which are Shading Repeat and Shading Type. This allows you to specify 2 (or more) different shading values so that you can alternate shading between rows or columns. The two properties for Shading Type are "ByRow" or "ByColumn". myTable.ShadingColor1 = "Blue"; myTable.ShadingPct1 = 20; myTable.ShadingRepeat1 = 1; myTable.ShadingColor2 = "Red"; myTable.ShadingPct2 = 40; myTable.ShadingRepeat2 = 1; myTable.ShadingType = "ByRow"; //or "ByColumn" SetBorders: The 2 border properties include thickness and location. Values for thickness are "Thin", "Medium," "Thick" and "None". If no parameter is specified, the border will default to none. Values for location are "Top," "Bottom," "Right" and "Left". myTable.Rows[0].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom); Font Formatting: The 3 properties for font formatting are Font Face, Text Color and Point Size. myTable.Rows[2].Cells[0].Font="Times New Roman"; myTable.Rows[2].Cells[0].TextColor="Red"; myTable.Rows[2].Cells[0].PointSize=15; Bold/Italics: Below is an example of how to apply Bold and Italic formatting to text in a cell: myTable.Rows[2].Cells[0].Bold="On"; myTable.Rows[2].Cells[0].Italic="On"; Margins: To use table margins, the new FPTableMargins object must be declared. Once the new FPTableMargins object is called, the 4 parameters that can be used are Top, Bottom, Left and Right. The margins for top and bottom are called out in 10ths of a point. For left and right they are called out in 100ths of a point myTable.Rows[2].Cells[0].Margins = new FPTableMargins; myTable.Rows[2].Cells[0].Margins.Top = 50; myTable.Rows[2].Cells[0].Margins.Bottom = 50; Rotation: The contents of a cell can be rotated by using the rotation property. Valid values for rotation are 0, 90, 180, or 270. myTable.Rows[3].Cells[0].Rotate = 90; To combine or merge cells together, HStraddle and VStraddle can be used to straddle cells both Horizontally and Vertically: myTable.Rows[3].Cells[0].HStraddle = 2; myTable.Rows[3].Cells[2].VStraddle = 2; To align content within cells horizontally, the HAlign property can be used with the values of "Left", "Right" and "Center": myTable.Rows[3].Cells[0].HAlign = "Left"; myTable.Rows[3].Cells[1].HAlign = "Right"; myTable.Rows[3].Cells[2].HAlign = "Center"; To align content within cells vertically, the VAlign property can be used with the values of "Top", "Bottom" and "Middle": myTable.Rows[3].Cells[0].VAlign = "Top"; myTable.Rows[3].Cells[1].VAlign = "Bottom"; myTable.Rows[3].Cells[2].VAlign = "Middle"; Advanced Settings: It is possible to specify a row in a table to be a header type and a footer type. When a row is specified as a header or footer, it will repeat on overflow pages. myTable.Rows[0].Type = "Header"; myTable.Rows[4].Type = "Footer"; There is also a way to skip a row in a table if needed. This could be based on some conditional logic. myTable.Rows[0].Type = "Skip"; //removes the row from the table Below is a sample table rule (containing 2 text fields for first and last name) and the resulting output: var myTable = new FPTable; myTable.AddColumns(7200, 7200, 7200, 7200); myTable.AddRows(3); myTable.Rows[0].Cells[0].Font="Times New Roman"; myTable.Rows[0].Cells[0].TextColor="Red"; myTable.Rows[0].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left"); myTable.Rows[0].CopyCells(0, 1,2,3); myTable.Rows[0].Cells[0].Content = "Hello"; myTable.Rows[0].Cells[1].Content = Field("FName"); myTable.Rows[0].Cells[2].Content = "Goodbye"; myTable.Rows[0].Cells[3].Content = Field("LName"); myTable.Rows[1].Cells[0].Font="Arial"; myTable.Rows[1].Cells[0].TextColor="Blue"; myTable.Rows[1].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left"); myTable.Rows[1].CopyCells(0, 1,2,3); myTable.Rows[1].SetContents( "Hola", Field("FName"), "Adios", Field("LName")); myTable.Rows[2].Cells[0].Font="Times New Roman"; myTable.Rows[2].Cells[0].TextColor="Green"; myTable.Rows[2].Cells[0].SetBorders("Thin", "Black", "Top", "Bottom", "Right", "Left"); myTable.Rows[2].CopyCells(0, 1,2,3); myTable.Rows[2].SetContents( "This", "Row", "is", "Green"); return myTable.MakeTags(); http://forums.printable.com/attachment.php?attachmentid=417&stc=1&d=1301344348 PDF version of this document
  11. Hi guys, I have very basic knowledge in JavaScript. I mean very basic knowledge. Does anyone know what will be a good starting point to start learning Javascript for fusionpro. I use this with EFI Digital Storefront for make templates. Looking forward to hearing you you. Thanks in advance. Naval
  12. Hi there can anyone please help me rewrite this javascript rule below if (Field("Mob") == "") return ""; else return '<f name="AC Bliss Medium"><z newsize="7"><color cmyk=000000FF>Mob </color></f>'+ '<f name="AC Bliss Light", <z newsize="7"><color cmyk=000000FF>' + Field("Mob")+ '<br>';'</color></f>'; Someone has written this rule but i want to know if there is a way to simplify this. What this essentially is returning is Mobile phone field with a prefix Mob in AC Bliss Medium font and then the mobile number that the user enters in AC Bliss Light font. Thanks for your help in advance. Naval
  13. I am setting up a business card for a digital storefront using FusionPro. The customer has certain optional certifications that could appear after their name. The customer wants the DSF user to be able to select from a list of certifications rather than enter the certifications manually, so I have set up a pick list as a multi-select box in my FusionPro HTML Form. I have entered all of the possible certifications (AAMS®, CFP®, CFA, etc.) in the pick list as well as a “none” choice in case they don’t have any certifications. The FusionPro fields are as follows: <Fullname><Certifications> <Title1> <Title2> Q1: Does anyone know how the data is output from the storefront if multiple entries are selected from a multi-select box? Is it an array? Q2: Assuming the data is an array, can anyone suggest a javascript that will extract each entry from the array, then format the certifications so they have a comma and space after each one. * Keep in mind the options are none, one selection, or multiple selections. The first line of the business cards should look like: Joe Smith, AAMS®, CFA I am envisioning a script that basically says, If the field Certifications = “none” then return “”, else return the field Certifications, but with formatting “entry1, entry2, entry3, etc.” I can create basic javascripts using the FusionPro building blocks, but this may be out of my league. I don’t know how to handle the formatting part. Can someone help me with this please?
  14. Copy and paste everything below this line: This rule automatically superscript the dollar sign for pricing. Prior to using this rule, you need to set the superscript offset and ratio values in the Global Paragraph Settings dialog box. To do this: Double-click any text frame and click the Edit Text… button. In the Variable Text Editor, click the Paragraph button. In the Paragraph Formatting dialog box, click the Global Settings… button. Once you have set the values, change the field "Price" in this JavaScript rule to the name of the field in your data. // set superscript font size and baseline shift in template: // Variabe Text Editor --> Paragraph... --> Global Settings... // Superscript (Ratio and Offset). // Set price field name here. priceVariable=Field("Price") ///////// priceVariable=priceVariable.replace("$", ""); //remove dollar sign if entered by user priceVariable=FormatNumber("##,###.00##", priceVariable); //format as price with two digits after decimal point var dollarsCentsArray=priceVariable.split("."); //divide up dollars and cents dollars = dollarsCentsArray[0]; cents = dollarsCentsArray[1]; //format with superscripted dollar sign/cents if dollars are entered //or with superscripted cent sign if no dollars entered if (dollars!="") { return '<superscript>'+"$"+'</superscript>'+dollars+'<superscript>'+cents+'</superscript>'; } else { return cents+'<superscript>'+"¢"+'</superscript>'; }
  15. Hi, I have a problem with a piece of code on a business card in DSF/FP9.3. We need to keep a string on one line without wrapping and use the function below. Works fine unless there is a "&" in the input field. "Me And You" works fine but "Me & You" composes to "Me & You" Anyone know how to overcome? function NoBreak(s) { return NormalizeEntities(s).replace(/ /g, " "); } return NoBreak(Field("title"));
  16. Hi All, I am looking for some ideas and help on how to print data from multiple rows on one page of a two page letter. There is a unique field for each name in the data "account id". There is no set number of rows for each id. One in the full data has 30 rows. I attached a sample of the data and a two page pdf that shows how the data fields need to be laid out. The back page is what has me stumped. I need to get the "close date" and the "amount" for each row that has the same "account id" to be placed on the back page of the doc. I tried searching the forum but not sure what to even search for. I assume I will need to use some kind of table and an array. I am totally ignorant of both I have just dabbled some in JavaScript by reading this forum for ideas and direction. If anyone can point me in the right direction on where to start on this it would be greatly appreciated. TestData.zip VariableLayout.pdf
  17. Hello All - I recently posted a question about changing font colors when a certain image is selected, and was given this rule as a solution, and it works perfectly. var color = ''; switch (GetFileName(Field("headerImage"))){ case "red.pdf": color = "PANTONE Red 032 C"; break; case "blue.pdf": color = "PANTONE 2945 C"; break; case "gray.pdf": color = "PANTONE 430 C"; break; default: color = "PANTONE 266 C"; } return '<color name="' + color + '">' + ToUpper(Field("dynamicSubOne")) + '</color>'; Since then, there was a request for additional functionality. Now ,in addition to the above, I need to return a unique image as well to a picframe ("logo") that is also associated with the color themes. I've made a number of attempts, but I'm not able to get the actual image to change. Any advice on how to associate a unique pic within the switch case rule? Any help very much appreciated! Matt
  18. Hello All - I've run into a problem, where my Javascript rule works perfectly within Fusion Pro, but not within Marcom. The rule: var redSubOne = "<color name = \"PANTONE Red 032 C\">" + Field("dynamicSubOne") + "</color>"; var blueSubOne = "<color name = \"PANTONE 2945 C\">" + Field("dynamicSubOne") + "</color>"; var graySubOne = "<color name = \"PANTONE 430 C\">" + Field("dynamicSubOne") + "</color>"; var purpleSubOne = "<color name = \"PANTONE 266 C\">" + Field("dynamicSubOne") + "</color>"; if(Field("headerImage") == ("red.pdf")){ return redSubOne.toUpperCase(); }else if(Field("headerImage")== ("blue.pdf")){ return blueSubOne.toUpperCase(); }else if(Field("headerImage")==("gray.pdf")){ return graySubOne.toUpperCase(); }else{ return purpleSubOne.toUpperCase(); } The Problem: Within Marcom, the rule defaults to the final "else" statement, always returning the purple font. Again, this rules work fine within Fusion Pro. Any thoughts or input would be very much appreciated. Thanks!
  19. Hello, I am new and jumping in head first per usual. I am working on an invite for a client and that will allow them to have multiple sub events (reception, dinner, lecture, movie, etc.) under the date of the main event on the invitation. They are required to enter one and at maximum allowed to have four. The sub events are broken in a 1 | 2 & 3 | 4 format. Format Example: Event 1 00:00 p.m. | Event 2 00:00 p.m. Event 3 00:00 p.m. | Event 4 00:00 p.m. *note two spaces on either side of pipeline (|) FusionPro Rules if (Field("Event1_title") != "" && Field("Event2_title") != "") return Field("Event1_title") + ' ' + Field("Event1_time") + ' ' + Field("Event1_ap") + ' ' + ' | ' + ' ' + Field("Event2_title") + ' ' + Field("Event2_time") + ' ' + Field("Event2_ap"); else if (Field("Event1_title") != "" && Field("Event2_title") == "") return Field("Event1_title") + ' ' + Field("Event1_time") + ' ' + Field("Event1_ap"); else if (Field("Event1_title") == "" && Field("Event2_title") != "") return Field("Event2_title") + ' ' + Field("Event2_time") + ' ' + Field("Event2_ap"); else return ''; if (Field("Event3_title") != "" && Field("Event4_title") != "") return Field("Event3_title") + ' ' + Field("Event3_time") + ' ' + Field("Event3_ap") + ' ' + ' | ' + ' ' + Field("Event4_title") + ' ' + Field("Event4_time") + ' ' + Field("Event4_ap"); else if (Field("Event3_title") != "" && Field("Event4_title") == "") return Field("Event3_title") + ' ' + Field("Event3_time") + ' ' + Field("Event3_ap"); else if (Field("Event3_title") == "" && Field("Event4_title") != "") return Field("Event4_title") + ' ' + Field("Event4_time") + ' ' + Field("Event4_ap"); else return ''; Text Generated out of MarcomCentral Portal when I test my template: http://www.rboweb.com/WASHU/IMGS/EXAMPLES/example.jpg It works and I'm not receiving any errors, but it's loosing my double spacing on either side of my pipeline in just the first rule only on MC and I can't figure out why. Validating the code in FP gives me the correct output and the second rule is formatting correctly. You can see that I have already attempting appending the second space separately to see if that fixed it. Any thoughts?
  20. Running a non-variable page booklet. I need to place a barcode and some text every X number of pages. In this case its 50. With the scanner turned on i can turn off double detect and some other features that slow down collating. If it doesn't see the mark on the 50th page it diverts the collation to the end of the line without finishing. if this is a bad explaination lets make it simple. I am making pads in 50's, and i want to print "END_PAD" on the last page of every 50th page. I have tired it with a if or statement but i think I need the function to start page count - since its every 50 imposed pages not 50 records
  21. Hi I have a template, where I need to make a QR-code and set the color of it. So I have made a rule for this. But what ever color or size I set in the text frame with the QR-code does not apply. If I make QR-code from the built in dialogs (without converting to JavaScript), then I can change the color and size. Here is my code var PointSize = "18"; var NameRuleOrField = Trim(Field("Name")); var CompanyRuleOrField = Rule("R Companyname for QR"); var PhoneRuleOrField = Trim(Field("Direct phone")); var MobileRuleOrField = Trim(Field("Mobile phone")); var EmailRuleOrField = Rule("R Email for QR"); var WebsiteRuleOrField = "www.tytex.com"; if (Trim(Field("Title 2")).length == 0 ) { var TitleRuleOrField = Rule("R Title 1"); } else { var TitleRuleOrField = Rule("R Title 1") + ", " + Rule("R Title 2"); } // vCard format // http://en.wikipedia.org/wiki/VCard // Note that support for vCard may be more limited than for MECARD, // and that vCard requires more data to be encoded, resulting in a denser barcode. var info = { N: NameRuleOrField, ORG: CompanyRuleOrField, TITLE: TitleRuleOrField, "TEL;WORK;VOICE": PhoneRuleOrField, "TEL;WORK;CELL": MobileRuleOrField, EMAIL: EmailRuleOrField, URL: WebsiteRuleOrField, } var result = ["BEGIN:VCARD", "VERSION:2.1"]; for (var label in info) { if (info[label]) result.push(label + ":" + info[label]); } result.push("END:VCARD"); return MakeQRBarcodeGraphic(result.join(Chr(13) + Chr(10))); var QR = new QRBarcode; QR.pointSize = Int(PointSize) || 10; return QR.Make(result); And here is a collect of my job. https://dl.dropboxusercontent.com/u/1372858/Temp/1/Collect.zip.zip Hope somebody can see what is missing.
  22. Job Description: Build and program (JavaScript) variable data templates using FusionPro software from client-supplied digital art files. Responsibilities also include uploading, configuring and testing final files. Create HTML emails and microsites for cross-media marketing campaigns and online storefronts. Provide internal and external support on graphic issues related to client projects. Analyze client layout files with Project Managers (and occasionally clients) to develop project implementation and workflow strategies. Required skills: Bachelor’s degree or equivalent combination of education and experience Knowledge of variable data publishing technologies Knowledge of graphics arts and typography, page layout, image management, and various forms of print output involving PostScript and PDF workflows Knowledge of fonts and font management software Knowledge of HTML, CSS and JavaScript Knowledge of Adobe Creative Suite Some proficiency in Excel and database manipulation Proficiency in both Mac & Windows platforms Must be able to manage numerous projects simultaneously under deadline pressure. Excellent verbal and written communication skills Desired Skills and Knowledge: Background in Graphic Design Please submit your resume to jobs@pti.com – Attn: GFX
  23. Hi, I've searched the forums and still cannot find a solution or found a way to get it working. Scenario I have a 2 page PDF and I want to output 100 copies with each copy on the front page displaying a unique number ie. 1 to 100. I know I can do this very easily by connecting to a database, but there must be a simpler way to do this without creating a database each time as you can do this in PrintShop Mail without a database. Any help with this would be greatly appreciated for a Javascript newbie. Thanks in Advance!
  24. Here is the details: I have 1 large data file. Within that data file I have 20 versions. Each version has different quantities. The problem: I need to output SEPARATE .pdfs based on each version... with each each PDF named what version it is tagged to. Example: A01 has 33214 records A02 has 26102 records...etc. I need a PDF named A01.pdf that has 33214 records, and I will need another PDF named A02.pdf with 26102 records and so on.... I am certain there is a callback rule that can be created, but my javascript/script writing skills is minimal to none.
  25. So I have a business card where the address and other info all share one box. They display like this: «Address»«Address2_rule» «City», «State» «Zip» «Country» «Gap_rule» «Phone1_Label_Rule» «Phone1_Format_Rule» «Phone2_Label_Rule» «Phone2_Format_Rule» «Phone3_Label_Rule» «Phone3_Format_Rule» «Phone4_Label_Rule» «Phone4_Format_Rule» Email: «Email»@epam.com «Other_Label_Rule»«Other» The text box is set to "Adjust text to fit" The phone lines are set to "Do not break on copyfit" Address2 is not involved in any rules for any Phone label or number. When there is no Address 2, my output displays like this: """ 123 Anystreet Citytown, PA, 12356 USA Main: +1(123) 456-7890 ext.12345 Fax: +1(123) 098-7654 Cell: +1(123) 102-9837 Email: JSnow@company.com """ When there is an Address 2, my output displays like this: """ 123 Anystreet Suite 303 Citytown, PA, 12356 USA Main: +1(123) 456-7890 ext.12345 Fax: +1(123) 098-7654 Cell: +1(123) 102-9837 """ When there is no Address2, but an extra line for Phone4, the extension is still on the same line. I need help understand what is going on here. I cannot comprehend why the extension would drop a line only when address2 is present. This is also causing my email to no longer fit in the text box. Attached is my collected files. 84150_Epam_BC_Mar-11-2014_07-40-39.zip
×
×
  • Create New...