Jump to content

Search the Community

Showing results for tags 'textmeasure'.

  • 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

Found 3 results

  1. I've been using simple rules for internal client templates and so far this has been straightforward but right now, I'm at a loss to what to for a more complex rule. Disclaimer is I'm not a developer and more of a HTML/CSS person so I've been going in blind for a lot of the more complex (to me) JavaScript (I have been using the W3 School site to try to learn it) - So please bear with me. Currently I'm working on a project on Fusion pro that requires the street address and city of one of our clients. And the format is basically this: <Street Address><Ste or Office number> | <City> However, some of our client addresses are incredibly long and fill the whole line and that causes the line to break and <City> to go to another line. The problem is that the "|" also breaks to the next line and aesthetically it's not the greatest. So what I'm trying to figure out is if the combined address field is longer than the textbox and forces <City> to break to the next line, I'd like to suppress the "|" and have the break as is so it would effectively be: <Street Address><Ste or Office number> <City> I looked through the forums and I saw the threads about using Text Measure, and I've used simple suppression rules before - I'm just at a bit of a loss at how to effectively combine the two so that the suppression rule is triggered when the address fields spans the whole text box length. Thanks!
  2. I have a right justified Email, and I need to align the Cellphone line to the left most extents of the Email line. I have a formatting issue I've been trying to tackle, however the FusionProTextMeasure seems to be limited by a defined point size, so when copyfit takes over the measurement is no longer accurate. I'm not sure if this is even the best way to approach this as I'm quite new to FusionPro. This approach calculates the size of both lines, subtracts them to get the difference and tosses that into a rindent tag format for the cellphone line. var rightIndentSize = function () { // Default Pt Size var ptSize = "6 pt"; // Email Size var emailString = "email: " + Rule("Email_Format"); var emailTM = new FusionProTextMeasure; emailTM.pointSize = ptSize; emailTM.font = "Helvetica"; emailTM.useTags = false; emailTM.CalculateTextExtent(emailString); // Cellphone Size var cellString = "cell: " + Rule("Cellphone_Format"); var cellTM = new FusionProTextMeasure; cellTM.pointSize = ptSize; cellTM.font = "Helvetica"; cellTM.useTags = false; cellTM.CalculateTextExtent(cellString); // Calculate difference in size var tmWidth = (emailTM.textWidth - cellTM.textWidth); return tmWidth; } return "<p rindent=" + rightIndentSize() + ">" + "cell: " + Rule("Cellphone_Format") + "</p>"; I'd like to have this work with copyfit as some of the emails are bound to get quite long. Also it would be nice if the rules weren't hard coded for font sizes, might make the rules a little more versatile. Any help is much appreciated. Thanks, Evan Archive.zip
  3. I have a letterhead I need the address info to be on the top right corner, but aligned left, where the end of the furthest right letter of the Address and/or Address2 lines up with the 8" mark. To compensate for this, I have set a rule that calculates how many spaces it needs to use as padding to before each line. (Feel free to point out a better way.) The below code keeps erroring out on line 52: Error: execution limit exceeded. I'm not sure why it wouldn't work. Any ideas? var frameWidth = 2; // set width of the text box (in inches) // Use TextMeasure to get the length of each company name var space = new FusionProTextMeasure; space.pointSize = "8 pt"; // set the type size space.font = "HelveticaNeue Condensed"; // set your typeface space.CalculateTextExtent(" "); space.useTags = false; var spaceWidth = space.textWidth; // Use TextMeasure to get the length of each company name var address1 = new FusionProTextMeasure; address1.pointSize = "8 pt"; // set the type size address1.font = "HelveticaNeue Condensed"; // set your typeface address1.CalculateTextExtent(Field("Address")); address1.useTags = false; var addressWidth = address1.textWidth; // Use TextMeasure to get the length of each company name var address2 = new FusionProTextMeasure; address2.pointSize = "8 pt"; // set the type size address2.font = "HelveticaNeue Condensed"; // set your typeface address2.CalculateTextExtent(Field("Address2")); address2.useTags = false; var address2Width = address2.textWidth; // Use TextMeasure to get the length of each company name var gap = new FusionProTextMeasure; gap.pointSize = "8 pt"; // set the type size gap.font = "HelveticaNeue Condensed"; // set your typeface gap.CalculateTextExtent(" • "); gap.useTags = false; var gapWidth = gap.textWidth; var i=1 var success = false while (success == false) { if (Field("Address2") != "") //if there is an address2 { if((spaceWidth*i) + addressWidth + gapWidth + address2Width >= frameWidth*7200) //if there is an address 2 and the width is greater or equal to frameWidth { success= true; //then stop looking } else i= i+1; // if there is an address 2 and the width is less than frameWidth }; if ((spaceWidth*i) + addressWidth >= frameWidth*7200) //if there is no address 2 and the width is greater than frameWidth { success= true; //then stop looking } else i= i+1; // if there is no address 2 and the width is less than frameWidth #### ERRORS OUT ON THIS LINE #### }; var result = Array(i).join('space'); return result;
×
×
  • Create New...