Jump to content

Susan

Registered Users - Approved
  • Posts

    69
  • Joined

Posts posted by Susan

  1. I recently upgraded to FP 13.0.2 on a Mac running Monterey 12.6.2. I can create a job and compose to either my Desktop or the Server without problems initially. If I go back to the job later to make a change or just compose it again Acrobat crashes and it will not compose. I have to recreate the FP job again by importing the .def file and Acrobat FP pdf and then it composes normally. Is there a way I can avoid having to do this with every job? Thanks.
  2. I've used this rule which uses the width of your text box and will break the email address if it doesn't fit.

     

     

    // Use TextMeasure to get the length of each email

    var tm = new FusionProTextMeasure;

    var frameWidth = 2.5; // set width of the text box (in inches)

    tm.pointSize = "10 pt"; // set the type size

    tm.font = "Calibri"; // set your typeface

    var str = Field("email address"); // set the field to use

    tm.CalculateTextExtent(str);

    tm.useTags = false;

    var tmWidth = tm.textWidth;

     

    return (tmWidth < frameWidth*7200) ? str : str.replace("@unecessarilylongdomain.com", "<br>@unecessarilylongdomain.com");

  3. I have a table which uses external data by matching account numbers. Below the table are totals which are taken from the mailing data brought in through FusionPro (not in my table rule). I was wondering if there is a rule that would subtract an amount in a external data field from an amount in the mailing data. I've attached a sample of what I mean.

    FP Help.zip

  4. I'm having issues creating 9 of 3 barcodes. Some are composing correctly but some are not and can't be scanned. I can't find a common link for the ones that aren't composing correctly. I've attached a small sample data file with the FP file. Entries 3, 4, 6 are bad.

    to FP.zip

  5. I am using a rule from this site to convert 13-Oct-15 dates to October 13, 2015. It is working correctly, but when there is no data in the "GIFT_DATE" field I get this error "uncaught exception: Error in function "DateFromString": Could not convert "" to a valid date."

     

    Is there something I can add to the rule so that I don't get the error for the empty "GIFT_DATE" fields. It makes it harder to catch real errors. The rule is below:

     

    var str = Field("GIFT_DATE");

     

    var MonthNameAbbrs = [ "jan", "feb", "mar", "apr", "may", "jun",

    "jul", "aug", "sep", "oct", "nov", "dec" ];

     

    var month_name_part = 0;

    var parts = str.replace(/-/g,'/').split('/');

    for (var i = 0; !month_name_part && i < parts.length; i++)

    {

    if (isNaN(parseInt(parts)))

    {

    for (var m = 0; m < MonthNameAbbrs.length; m++)

    {

    if (ToLower(parts).substr(0,3) == MonthNameAbbrs[m])

    {

    parts = m + 1;

    month_name_part = i + i;

    break;

    }

    }

    }

    }

     

    if (month_name_part)

    {

    var mpart = month_name_part - 1;

    var mval = parts[mpart];

    parts.splice(mpart, 1);

    parts.splice(0, 0, mval);

    }

     

    var date = DateFromString(parts.join('/'));

    return FormatDate(date, "lm d, yyyy");

  6. I recently upgraded to FP 10.1.9. I have PFImposer templates that I have been using for years and now the imposed pages have shifted to the left and bottom when I compose as a PPML. Composing to a imposed PDF usually works but that is not ideal for refining on the digital presses. Does anyone have a fix for this? Thanks.
  7. I have a Invoice that I am using overflow pages. The front is overflow1 and the back is overflow2. Is there a way to use Page «$pagenum» of «$pagecount» so that it will just count the fronts.

     

    Example: If it composes 3 fronts and backs,I need it to number the fronts as Page 1 of 3, Page 2 of 3, Page 3 of 3 — not number fronts and backs as Page 1 of 6, Page 2 of 6, etc.

  8. I have a rule where the line will break after the " & " when the whole line won't fit. I also want it to break after " and " since some entries use "and" instead of "&". Where would I add another variable in the rule below?

     

    // Use TextMeasure to get the length of each company name

    var tm = new FusionProTextMeasure;

    var frameWidth = 2.5; // set width of the text box (in inches)

    tm.pointSize = "9 pt"; // set the type size

    tm.font = "Chronicle Deck"; // set your typeface

    var str = Field("Mailing Name "); // set the field to use

    tm.CalculateTextExtent(str);

    tm.useTags = false;

    var tmWidth = tm.textWidth;

    var a tmWidth = tm.textWidth;

     

    return (tmWidth < frameWidth*7200) ? str : str.replace(" & ", " &<br>");

  9. Thank you! Both the solutions worked great.

     

    I was having one more issue though when I was testing overflow pages. I got the warning "Table width exceeds column width; table may set outside frame." The output PDF looks correct but I numbered the "Charge" and "Credit" columns so I would be able to check it and it seems to be skipping number "118" and "218" and going to "119" on the second page. I've tried lengthening my table frame but that didn't work.

     

    I'm attaching the multipage FP file.

     

    Thanks again for your help.

    Multipage.zip

  10. I am creating a basic table but I can't figure out why I am getting extra blank rows on the top and the bottom of the table. I think it is this code — "myTable.AddRows(clientMatch.length+2);" — but if I remove it the table won't validate. The table rule is below. Files are attached also.

     

     

    if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true)

    {

    Rule("OnJobStart");

    }

     

     

    //Get a count of the total number of records in the external data file

    numRecsExtDF = externalDF.recordCount;

     

    /*=============================================================================

    || Create arrays to hold values that match the CID of the client's record

    ||=============================================================================*/

    var clientMatch = [];

    var duedateMatch = [];

    var descriptionMatch = [];

    var chargeMatch = [];

    var creditMatch = [];

     

     

    // Step through the external data file and push matches into their respective variables if there is a match

    for (var i=1; i <= numRecsExtDF; i++) {

    if (externalDF.GetFieldValue(i, 'ContractNumberFormat') == Field("ContractNumberFormat")){

    clientMatch.push(externalDF.GetFieldValue(i, 'ContractNumberFormat'));

    duedateMatch.push(externalDF.GetFieldValue(i, 'duedate'));

    descriptionMatch.push(externalDF.GetFieldValue(i, 'transactioncodedescription'));

    chargeMatch.push(externalDF.GetFieldValue(i, 'charge'));

    creditMatch.push(externalDF.GetFieldValue(i, 'credit'));

     

    }

    }

     

    /*=============================================================================

    || Create the table

    ||=============================================================================*/

    new FPTable;

    var myTable = new FPTable;

    myTable.AddColumns(6600, 27200, 10200,7400)

    myTable.AddRows(clientMatch.length+2); // add 2 additional rows (Header and summary lines)

     

     

    // interate through the length of the arrays (data matches from external data file) and create rows

    for (var i=1; i<=clientMatch.length; i++) {

    // TABLE CONTENT FORMATTING

    myTable.Rows.Cells[0].Font = "Arial SF MT";

    myTable.Rows.Cells[0].PointSize = "9";

    myTable.Rows.Cells[0].TextColor = "Black";

    myTable.Rows.Cells[0].Margins = new FPTableMargins;

    myTable.Rows.Cells[0].Margins.Top = 5;

    myTable.Rows.Cells[0].Margins.Bottom = 5;

    myTable.Rows.Cells[0].Margins.Right = 200;

    myTable.Rows.Cells[0].Margins.Left = 200;

    myTable.Rows.CopyCells(0,1,2,3); // Apply the same formating to each cell in this row

     

     

    // CREATE CONTENT FOR EXTERNAL DATA FILE RECORDS

    myTable.Rows.Cells[0].HAlign = "Left";

    myTable.Rows.Cells[1].HAlign = "Left";

    myTable.Rows.Cells[2].HAlign = "Right";

    myTable.Rows.Cells[3].HAlign = "Right";

    myTable.Rows.SetContents(duedateMatch[i-1], descriptionMatch[i-1], chargeMatch[i-1], creditMatch[i-1]);

     

    }

    return myTable.MakeTags();

     

     

     

    Thanks for any help.

    for Forum.zip

×
×
  • Create New...