Jump to content

Search the Community

Showing results for tags 'rules'.

  • 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 17 results

  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. See attached PDF. Is this a glitch in FusionPro 11.0.9. I never had this problem in 10.0.26. FusionPro is not picking up the rule. Is there something I'm doing wrong here. This should be simple. Rule setup and rule placement.pdf
  3. Bellow is a rule I pieced together from some other post. It worked for what I needed but I would like to learn how to clean something like this up and make it more efficient. So if you are bored and good at coding some help would be greatly appreciated. Thank you, var StrLine1 = (!Field("series_1")) ?" ": Trim(Field("series_1") + "<br>"); var StrLine2 = (!Field("series_2")) ?" ": Trim(Field("series_2") + "<br>"); var StrLine3 = (!Field("series_3")) ?" ": Trim(Field("series_3") + "<br>"); var StrLine4 = (!Field("series_4")) ?" ": Trim(Field("series_4") + "<br>"); var StrLine5 = (!Field("series_5")) ?" ": Trim(Field("series_5") + "<br>"); var StrLine6 = (!Field("series_6")) ?" ": Trim(Field("series_6") + "<br>"); var StrLine7 = (!Field("series_7")) ?" ": Trim(Field("series_7") + "<br>"); var StrLine8 = (!Field("series_8")) ?" ": Trim(Field("series_8") + "<br>"); var StrLine9 = (!Field("series_9")) ?" ": Trim(Field("series_9") + "<br>"); var StrLine10 = (!Field("series_10")) ?" ": Trim(Field("series_10") + "<br>"); var StrLine11 = (!Field("series_11")) ?" ": Trim(Field("series_11") + "<br>"); var StrLine12 = (!Field("series_12")) ?" ": Trim(Field("series_12") + "<br>"); var StrLine13 = (!Field("series_13")) ?" ": Trim(Field("series_13") + "<br>"); var StrLine14 = (!Field("series_14")) ?" ": Trim(Field("series_14") + "<br>"); var StrLine15 = (!Field("series_15")) ?" ": Trim(Field("series_15") + "<br>"); var StrLine16 = (!Field("series_16")) ?" ": Trim(Field("series_16") + "<br>"); return StrLine1 + StrLine2 + StrLine3 + StrLine4 + StrLine5 + StrLine6 + StrLine7 + StrLine8 + StrLine9 + StrLine10 + StrLine11 + StrLine12 + StrLine13 + StrLine14 + StrLine15 + StrLine16;
  4. Sorry, I think I posted it in the wrong spot before so there may be a duplicate. I have postcards that require a picture and the agents name to go into certain areas. But the areas for each postcard is in a different spot. I believe I have a body setup correctly and a template page for each version of the postcard with the picture and name. My problem is that I am not understanding the rule that I need to make it work properly. I need to used the "TEMPLATENAME" in the csv file. Can somebody help me understand the rule that needs to be created. I have attached a test file with all the resources needed. I will end up adding another 10-12 more version of the postcard that have the information in different spots. Thanks Damien weekly test.zip
  5. I have postcards that require a picture and the agents name to go into certain areas. But the areas for each postcard is in a different spot. I believe I have a body setup correctly and a template page for each version of the postcard with the picture and name. My problem is that I am not understanding the rule that I need to make it work properly. I need to used the "TEMPLATENAME" in the csv file. Can somebody help me understand the rule that needs to be created. I have attached a test file with all the resources needed. I will end up adding another 10-12 more version of the postcard that have the information in different spots. Thanks Damien weekly test.zip
  6. Is there a way to save a persistent rule throughout FusionPro Creator so that whenever I begin a project I have this specific rule available? I know I can create a base template and then copy that multiple times, but that isn't a good practice with the amount of variable frames I deal with. Any suggestions are appreciated.
  7. 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>'; }
  8. 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!
  9. I picked the phone formatting rule in Fusion Pro and altered it a little. I added a phone number prefix ( T +1 (***) ***-***x) I want the T to be bold. So in my rule I have it as <b>T</b> +1 then the rule. But its not working. Validation comes up fine but it just shows the actual text I typed in. I have a screen shot attached. Thanks Screen Shot 2016-02-23 at 8.06.23 AM.zip
  10. Hello, Has anyone out there has found a way to adjust Linked Text Frames in the OnRecordStart rule or any other rule? I have 3 linked Text Frames that have continuous text flowing through them. When I linked the text frames, the program applied the same name to all three. However, when I add the code to my OnRecordStart rule to adjust the y coordinate for the text frames with that name, it will only move the first box in the series. Example: (moving frames 1 inch down on the y axis) var ExFrame = FindTextFrame("Example Text"); if (Field("SampleField")== "Yes"){ ExFrame.y = (ExFrame.y) + (1 * 7200); } Thoughts? P.S. 1 text box with multiple columns are not an option.
  11. For each template that we create we are adding an OnRecordStart rule that sets the quantity to print for each record from a field in the data base. What I would like to know is if there is a way to set this up as a global rule or function so I don't have to keep copying and pasting it at template creation. I couldn't find anything in the documentation which indicated how to create a callback rule, just text or graphics. Thanks.
  12. I need help writing a rule that I am sure is fairly easy, however I can't wrap my head around exactly how to write it. I have 1(one) graphic that I need to fluctuate 9 times in position on the page based on the database. I have 9 fields that all have different data in them per record. Sometimes all 9 fields for one record are populated, sometimes only 1 or 2 fields is populated. I would need the rule for my graphic position 1 to say: If field "field 1" and "field 2" and "Field 3", Etc... is blank return my graphic. Else return nothing at all. and the same thing for my graphic position 2, where the rule would say: If field "field 2" and "field 3" and "Field 4", Etc... is blank return my graphic. Else return nothing at all. Each subsequent graphic rule would be one less field to consider because in theory that one will be populated. Everything I have tried resulted in my graphic showing up in all the positions even though I excluded one field for each subsequent rule I wrote. I have included an example of what I am trying to achieve. See how the bottom text (Which I made a graphic-due to font issues) moves with the variable text-that I blurred out for security purposes. for PTI Example.pdf
  13. For some reason I cannot access the Rules documentation since 8.2.7 update was installed. Is there a place I can download that PDF? They are not under the documentation thread of this forum.
  14. Greetings to everybody at PTI and anybody else that reads this thread. My name is Rene, I work with the City of San Antonio's Print Shop doing Pre-Press and Graphic Design work. I'm looking for some help with posting mailing data. Now I have done this before where you do an imposition using a comma delimited Excel mailing list, multiple mailers on a sheet with a different address for every mailer - that I've done many times, not a problem. This project that we have now is already created as a PDF with 4 mailers on a sheet. Because of the bleed, finished cut size, size of paper we're using, print size limits of our printers, and the Post Offices mailing rules I might have to use the file they sent us the way they sent it to us. What I'm wondering, and haven't been able to figure out, is can I use FusionPro (version 8.0.20) to add 4 text different text boxes that I position where I need them on this 11x17 document and have it impose a different address for each one? I've done a little testing already and I can see that Fusion Pro can impose information to the 4 texts boxes I placed BUT it keeps giving me the same address in each of the 4 text boxes. Every page is imposed as the same address 4 times and I need 4 different addresses per page. Is there a rule I can write or a java script trick I can do to make it impose 4 different addresses in each of the 4 different text boxes per page? Someone help please. Thanks in advance, Rene
  15. I would like to be able to compare a field value in one record in my data source to see if it equals the value of that field in the next record in my data source. I would like to continue this comparison till the field value changes. The goal is to extract into each PDF letter all the rows that have the same field value in column one. So...instead of variable information coming from one record, I want to combine variable information from multiple rows (records) where a specific field value is the same. Has anyone done this?
  16. Before upgrading to 8.1.2, I could use import data definition to import rules from another document. I would receive a message that it couldn't locate the data file and then be allowed to navigate to the new data file. Now when I receive the message about the missing data file, the import aborts. No rules are imported nor am I given the opportunity to locate a new data file. I now have to open the other file, select the new data file and export the data definition before I can import it to the new file. Is there a better way to do this?
  17. Hello all, Having a problem with a quite complex disclaimer rule I have to write. Here is the logic I am trying to achieve and the problem I am facing: A customer chooses from a 3 topics from a dropdown library list of 20 topics in three different drop downs. Dropdown A -Topic 1 -Topic 2 -Topic 3... Dropdown B -Topic 1 -Topic 2 -Topic 3... Dropdown C -Topic 1 -Topic 2 -Topic 3... When a topic is selected, it is assigned a disclaimer. The disclaimer is setup as a formatted text resource. In this disclaimer there are embedded rules along with static content that link to other formatted text resources that contain variable parts of the disclaimer. Every different topic could have a different variable line. Say Topic E could have variable line A and G whereas Topic B could have variable line A, E, G, and X. The hard part in writing this rule is the fact that is has to allow for the line of variable text to not appear more than once even though they can select topics that might be assigned to the same variable line. So lets say the user did this scenario: Filled out all three dropdowns with the following: Dropdown 1: Topic E = Variable lines A &G Dropdown 2: Topic J = Variable lines A & F Dropdown 3: Topic X = Variable lines A & B & F & S I only want Variable line A and F to appear once even though they are selected 3 times and 2 times respectively. Here is the code I thought would work: My thought process is that I could write a rule for each variable disclaimer copy line and topic... This code is factoring in that I already went though and picked out all the topics that use a respective variable line of disclaimer copy. Like this example... Variable Disclaimer Copy 1 is used in the following titles: • Protecting Purchasing Power (CE) • Global & Financial Market Outlook • Globalize Your Thinking (CE) • Beyond Bonds - Income Alternatives with Growth Potential • High Conviction Investing: The Benefits of Active Management • Senior Floating Rate and High Yield Bonds Can Potentially Help Your Investors • Investing in an Uncertain World • Globalization: A New Era for Defined Contribution Plans which is why I'll have to write a rule similar to this eight times. Each unique topic will check the other ones to insure they do not equal a topic that already includes that variable line. then it will return nothing until it finds the one the user entered... if ((Field("SelectInviteTopicOne") == "Protecting Purchasing Power (CE)") || (Field("SelectInviteTopicTwo") == "Protecting Purchasing Power (CE)") || (Field("SelectInviteTopicThree") == "Protecting Purchasing Power (CE)")) return Resource("Variable Disclaimer Copy 1"); else if (Field("SelectInviteTopicOne") != "Global & Financial Market Outlook") return "" else if (Field("SelectInviteTopicTwo") != "Global & Financial Market Outlook") return "" else if (Field("SelectInviteTopicThree") != "Global & Financial Market Outlook") return "" else if (Field("SelectInviteTopicOne") != "Globalize Your Thinking (CE)") return "" else if (Field("SelectInviteTopicTwo") != "Globalize Your Thinking (CE)") return "" else if (Field("SelectInviteTopicThree") != "Globalize Your Thinking (CE)") return "" else if (Field("SelectInviteTopicOne") != "Beyond Bonds - Income Alternatives with Growth Potential") return "" else if (Field("SelectInviteTopicTwo") != "Beyond Bonds - Income Alternatives with Growth Potential") return "" else if (Field("SelectInviteTopicThree") != "Beyond Bonds - Income Alternatives with Growth Potential") return "" else if (Field("SelectInviteTopicOne") != "High Conviction Investing: The Benefits of Active Management") return "" else if (Field("SelectInviteTopicTwo") != "High Conviction Investing: The Benefits of Active Management") return "" else if (Field("SelectInviteTopicThree") != "High Conviction Investing: The Benefits of Active Management") return "" else if (Field("SelectInviteTopicOne") != "Senior Floating Rate and High Yield Bonds Can Potentially Help Your Investors") return "" else if (Field("SelectInviteTopicTwo") != "Senior Floating Rate and High Yield Bonds Can Potentially Help Your Investors") return "" else if (Field("SelectInviteTopicThree") != "Senior Floating Rate and High Yield Bonds Can Potentially Help Your Investors") return "" else if (Field("SelectInviteTopicOne") != "Investing in an Uncertain World") return "" else if (Field("SelectInviteTopicTwo") != "Investing in an Uncertain World") return "" else if (Field("SelectInviteTopicThree") != "Investing in an Uncertain World") return "" else if (Field("SelectInviteTopicOne") != "Globalization: A New Era for Defined Contribution Plans") return "" else if (Field("SelectInviteTopicTwo") != "Globalization: A New Era for Defined Contribution Plans") return "" else if (Field("SelectInviteTopicThree") != "Globalization: A New Era for Defined Contribution Plans") return ""; I appreciate any help anyone could forward me. I am taking a javascript class in a couple weeks that I hope will prove useful in working with these types of issues. I really don't know how to approach this complex a statement. Best, -Dan
×
×
  • Create New...