Jump to content

Cat

Members
  • Posts

    23
  • Joined

  • Last visited

Converted

  • Location
    Left Coast

Converted

  • FusionPro Products
    Yes

Cat's Achievements

Apprentice

Apprentice (3/14)

  • Dedicated Rare
  • Reacting Well Rare
  • Collaborator Rare
  • One Month Later
  • First Post Rare

Recent Badges

0

Reputation

  1. If a variable is empty I would like a graphic frame to cease to exist. This should be a simple if statement, but I can't seem to make it happen.
  2. Dan, Now that you mention it, it would make sense to have variable item and allow a spreadsheet upload for the information, and then do the imposition thing. Sometimes it takes and outside view to state the obvious. Blarg... and thank you!
  3. I'm trying to create a table for a sheet of labels. I can set a width for the cells and margins, but I cannot set a fixed height for the cells, so the content will not position correctly. The labels are 2.625x1 inches. Here is the converted rule: // Rule converted from XML Template "copy_Table Style": // Begin XML Template selections // var HasGrid = true; // "Grid": CheckGroup var GridStyle = "All"; // "Style:" (Required): PickList ["Inside" (Inside), "Outside" (Outside), "All" (All)] var Color = "Black"; // "Color:" (Required): ColorList var Thickness = "Thin"; // "Thickness:" (Required): PickList ["Thin" (Thin), "Medium" (Medium), "Thick" (Thick)] var HasHeaderShading = false; // "Header Shading": CheckGroup var HeaderColor = "Black"; // "Color:" (Required): ColorList var HeaderTint = Int("30"); // "Tint (%):" (Required): SingleLine (Integer) var HasRowShading = false; // "Row Shading": CheckGroup var RowColor1 = "Black"; // "First Color:" (Required): ColorList var RowTint1 = Int("30"); // "Tint (%):" (Required): SingleLine (Integer) var RowColor2 = "White"; // "Second Color:": ColorList var RowTint2 = Int("30"); // "Tint (%):" (Required): SingleLine (Integer) // Section "Margins": var MarginLeft = HundredthsOfPointsFromText("65 pt"); // "Left:": Space (SmallUnits) var MarginRight = HundredthsOfPointsFromText("10 pt"); // "Right:": Space (SmallUnits) var MarginTop = HundredthsOfPointsFromText("9 pt"); // "Top:": Space (SmallUnits) var MarginBottom = HundredthsOfPointsFromText("9 pt"); // "Bottom:": Space (SmallUnits) // Section "Fonts": var HeaderStyle = ""; // "Header Font:": CharStyle var BodyStyle = { "bold": "1", "color": "Black", "family": "Rack Sans", "italic": "0", "pointsize": "24 pt", }; // "Body Font:": CharStyle // End XML Template selections // var table = new FPTable; table.style = { each_cell: {}, headerStyle: HeaderStyle, bodyStyle: BodyStyle }; // Convert 0/1 strings to Boolean. table.style.headerStyle.bold = HeaderStyle.bold == "1"; table.style.headerStyle.italic = HeaderStyle.italic == "1"; table.style.bodyStyle.bold = BodyStyle.bold == "1"; table.style.bodyStyle.italic = BodyStyle.italic == "1"; if (HasGrid) { if (GridStyle != "Inside") table.SetBorders(Thickness, Color, "Top", "Bottom", "Left", "Right"); if (GridStyle != "Outside") { var eachCellRuling = { Color: Color, Thickness: Thickness }; // These need to be copied to each cell after the table is populated with data: table.style.each_cell.Rulings = { Left: eachCellRuling, Right: eachCellRuling, Top: eachCellRuling, Bottom: eachCellRuling }; } } if (HasHeaderShading) { table.HeaderShadingColor = HeaderColor; table.HeaderShadingPct = HeaderTint; } if (HasRowShading) { table.ShadingColor1 = RowColor1; table.ShadingPct1 = RowTint1; table.ShadingColor2 = RowColor2; table.ShadingPct2 = RowTint2; } // These need to be copied to each cell after the table is populated with data: table.style.each_cell.Margins = { Left: MarginLeft, Right: MarginRight, Top: MarginTop / 10, Bottom: MarginBottom / 10 }; return table;
  4. How do I trigger the indent setting in the "Paragraph..." tool? So far I'm not seeing any effect, even when I give the interface a 50pt value. I am also using the tabs with a dot leader effect. I'm not sure if combining the two settings breaks the tools ability to work.
  5. At some point I found instructions showing me a Rule interface that looked exactly like a text frame control. This allowed for the creation of formatted text to be chosen like a Rule and placed into a text frame. The problem I'm trying to figure out is how to have superscript $ and cents so that $5.00 would have tiny dollar sign and cents value. Ideally as a single rule to be placed into a text frame so it can be controlled as a single object. I have tried to search in the Forums and I keep getting the same cases listed on almost all the links retired in the search. No matter how I phrase my request.
  6. ThomasLewis, Thank you! Once I figured out the padding on the longest phone2Label variable [what you had as "Field("Phone 1 Prefix") in your sample], the code worked a treat.
  7. I need to align the phones and email to the left based on the length of the longest phone label. Both the phones have the label as a variable. I feel like this should be a simple build in tool setting, but I do not even know where to look for the information. See attached. The email should scale to fit on a single line as well.
  8. And the winner is: if (Filed("enddate1") == '') return Rule("01_startdate1format") else return [Rule("01_startdate1format"), Rule("01_enddate1format")].join('-'); Thank you Mr Korn!
  9. I am trying to put a date range with a separating dash, but if the end date is not present, I need the the separating dash to disappear. so if there are both dates (example): 10/13-10/14 if there is no ending date (example): 10/13 I've been able to do a hidden dash with times, but I cannot figure out how to do the hidden dash trick with a date and keep all the date options. I converted the Date format to JavaScript which is the following code: // 01_enddate1format - ID82 - v01 - cat // Rule converted from XML Template "Format Date": // Begin XML Template selections // var dateField = "enddate1"; // "Choose the date field:" (Required): FieldOrRuleList var format = "M/d"; // "Choose the format:" (Required): PickList ["M/d" (3/14), "M/d/yy" (3/14/01), "M/d/yyyy" (3/14/2001), "MM/dd/yy" (03/14/01), "MM/dd/yyyy" (03/14/2001), "d/M" (14/3), "d/M/yy" (14/3/01), "d/M/yyyy" (14/3/2001), "dd/MM/yy" (14/03/01), "dd/MM/yyyy" (14/03/2001), "d/NNN/yyyy" (7/Mar/2001), "dd/NNN/yyyy" (07/Mar/2001), "d/MMM/yyyy" (7/March/2001), "dd/MMM/yyyy" (07/March/2001), "MMM d, yyyy" (March 14, 2001)] var useDashes = false; // "Use dashes (-) instead of slashes (/)": CheckBox var includeWeekday = false; // "Prepend weekday name": CheckBox var language = "English"; // "Language (for day and month names)": Language // End XML Template selections // if (dateField != "enddate1") var theDate = ""; else var theDate = DateFromString(RuleOrField(dateField)); if (useDashes) { format = ReplaceSubstring(format, "/", "-"); } if (includeWeekday) { var delim = ""; if (format.indexOf(',') > -1) delim = ','; format = " - "+ "EE" + delim + " " + format; } return '-' + FormatDate(theDate, format, language);
  10. Dan, Love me some clean code, but... as usual, there was some user error. To make this work in MarcoCentral, I needed to: Make the field an "Image Drop-down Only". Set the "First Drop-Down Value Blank" to "No" Be sure the field was active and hidden. Just to review (for myself & others) in FusionPro/Acrobat Create an image file for the FPO/Keyline that will be used in the "KeylineGraphic" graphic frame (position the frame on an appropriate layer) Add the image as a Graphic Resource. Add an "OnRecordStart" rule with the following code: FindGraphicFrame("KeylineGraphic").suppress = !IsPreview(); Make sure you have a graphic frame called "KeylineGraphic" that is linked to the field name for the FPO image, and that the field is set to "Graphic" List the FPO image file name in the Data Source file for the document. Make sure you upload the FPO image file to MarcomCentral so that it is available to the product. Let me know if I've over-complicated this process, but this seems to be the way to make this work in my case. Thank you
  11. I have used the following code to have images show in an on-line only preview: //access the “isOnlinePreview” property and the “isPreview” property onlinePreviewVal = FusionPro.Composition.JobOptions.isOnlinePreview; desktopPreviewVal = FusionPro.Composition.isPreview; //if this is a preview composition or a desktop preview //then return the text “PROOF” if (onlinePreviewVal == "Yes" || desktopPreviewVal == true) FindGraphicFrame("KeylineGraphic").suppress = false; else FindGraphicFrame("KeylineGraphic").suppress = true; However, now I cannot get the above code to work. I've looked at the items where is -does- work and I cannot see what I'm missing. I build items in FusionPro and then place them as versioned products in MarcomCentral. Working on a Mac, using Acrobat Pro. ID71_RPIS015R_Recruiting Sign_11x17.zip
  12. Thomas, There was a bad setting in the the text frame! Line #4 was set to "Suppress if Empty" and NOT "Suppress if Containing Empty Variable" once I got that fixed, the code worked. I tested the issue by adding numbers to each line to see the exact information that was passing to the item, once I was able to ID the specific line that was misbehaving, that last issue was fixable. I've not had time to go through the Rules Manual and am in the process of trying to learn JavaScript, and there are days when my brain don't wanna! Thank you so damn much for your help!!
  13. Thomas, Nope. Sigh. In an attempt to see if values were passing, I looked at the settings in the forms and there were no values set to pass from any of the fields. So I believe that has been ruled out. If that were the case, then all the static values would pass and not just the one after the field entered. One of the reasons to use the table options was to force padding, but, as was seen, the static information does not want to be suppressed. One curious note: When I open the "OnRecordStart" rule I created from the code you provided, the FusionPro Composition System dialog window pops up and appears to process. I've not ever seen that happen when I've worked with the "OnRecordStart" rule before, limited though my xp is. Here is the log Job started 06:28:26 - 1692710906. Creator: FusionPro(R) VDP Creator 13.0.2 Computer Name: Current working folder: /Applications/PTI/FusionPro Temporary files folder: /var/folders/b3/3ys0r7dn6338kvb7_5d_rf280000gr/T/ Template File: /Volumes/ASSETS_FONTS_TEMPLATES/online_templates/nordstrom rack (pti - 24261 to dr - nordstromrack)/id_70 - rpis0819r_5x7_career pyramid sign/Fusion_Templates_FINAL/ID70_RPIS0819R_5x7_CareerPyramidSign.dif Input File: /Volumes/ASSETS_FONTS_TEMPLATES/online_templates/nordstrom rack (pti - 24261 to dr - nordstromrack)/id_70 - rpis0819r_5x7_career pyramid sign/Fusion_Templates_FINAL/ID70CareerPyr_final.txt Job Config File: /private/var/folders/b3/3ys0r7dn6338kvb7_5d_rf280000gr/T/ID70CareerPyr_final-Output.cfg Composing record #1, input record 1 Composing record #2, input record 2 Composing record #3, input record 3 Composing record #4, input record 4 Graphic is not found or is not processed properly: IMG_0174.jpg. Check for file existence and that it is of the proper format. Composing record #5, input record 5 Graphic is not found or is not processed properly: IMG_0174.jpg. Check for file existence and that it is of the proper format. Composing record #6, input record 6 Composing record #7, input record 7 Job ended 06:28:27 - 1692710907. Total Job Time: 1s Here is the "OnRecordStart" Rule that is in the file: for (var f in FusionPro.Fields) { if (!Trim(RawTextFromTagged(FusionPro.Fields[f]))) FusionPro.Composition.AddVariable(f, "", false); } for (i = 1; i <= 6; i++) { var fn = "pos" + i + "Dept" if (RawTextFromTagged(Field(fn)).length > 10) { var cf = CopyfitLineWithMagnify(Field(fn), "Brandon Grotesque Regular", 14, 140, false, "textwidth"); FusionPro.Composition.AddVariable(fn, '<span>' + cf + '</span>', true); } } I appreciate your help!
  14. Thomas, I should also mention that the template is posted into the MarcomCentral system for the client portal.
×
×
  • Create New...