Jump to content

dreimer

Registered Users - Approved
  • Posts

    524
  • Joined

Everything posted by dreimer

  1. Is there a way to define the max height for a row in a table? I have some data that has many characters and even if I figure out how to use a copyfit in my table rule, I am not sure it will make the font small enough. So I was wondering if I let it wrap, can I keep the next row from dropping down a space. TIA To be clear, the table is flowing into existing artwork that has each row one inch high. So if row 1 starts at Y coordinate of 1 and needs to copyfit or wrap, I still need row 2 to start at Y coordinate 2. Also, this is running using an external data source.
  2. I am able to get the PC to create this using ▪ in my rule and turning off the limit processing check box in the advanced tab in composition. I need to get this to work on the MAC but it doesn't handle it the same way. Anyone know the entity I need to use on the MAC. TIA
  3. Sweet!. Thank you once again sir!!
  4. So I have this rule that strings together 3 variable fields. Trying to modify it so if all three of my fields are not populated it will change accordingly: So right now the rule returns "Store1, Store2, and Store3". First I want to change the "and" to "&". But then if I only have two stores I want it to return "Store1 & Store 2". And finally if I only have one store to return "Store1" This rule I found in a different post so if it can be shorten up that is fine. The most I will have is three stores. I should mention this is in the middle of a large paragraph. TIA if (!Array.prototype.filter) { Array.prototype.filter = function(fun /*, thisp */) { "use strict"; if (this == null) throw new TypeError(); var t = Object(this); var len = t.length >>> 0; if (typeof fun != "function") throw new TypeError(); var res = []; var thisp = arguments[1]; for (var i = 0; i < len; i++) { if (i in t) { var val = t[i]; // in case fun mutates this if (fun.call(thisp, val, i, t)) res.push(val); } } return res; }; } var contact = [[Field("Store1")],[Field("Store2")],[Field("Store3")]]; var result = []; for(var i=0; i<3; i++){ if (contact[i][1] != "") { result.push(contact[i].join(" ")); } } return (result.length>2) ? result.join(", ").replace(/^(.*)(, )(.*?)$/, "$1, and $3") : result.join(", ").replace(/^(.*)(, )(.*?)$/, "$1 and $3");
  5. So I got a little more information on this. The time will be in it's own text box and is formatted in 12 hour format. So data will come in say as 10:00:00 AM or 5:30:00 PM. So I would need to write a rule for these text boxes to bold if 5:00PM or later Then I would need a text box for the Date and Day of the week. I would be supplied the date. For example: 7/7/2014. So I would need to convert that to say July 7, 2014 and also have the rule return the day of the week it is. So for these text boxes I would need a rule to Bold if the time is 5:00PM or later as well as if it falls on a weekend. Very complicated for my brain to wrap around. Hope this will help in understanding what I am up against and be able to get some guidance. TIA
  6. I am trying to figure out how to write a rule to change the font to bold if the time is after 5PM or a weekend date as well. I will have 21 text boxes that this will need and it could apply to any combination of them. At this point I do not have data but I assume the date will be its on field and the time will be another. The time part of the rule would seem static but I am guessing the weekend portion would vary based on the month. Could this rule even be accomplished? I know it would help if I had a file but I am trying to figure out if I can even do this before I get the job. TIA
  7. Perfect, thanks David. This will come in handy!
  8. ^^No sale. It creates a full imposed sheet for each page in the template. I get this error: OnRecordStart, line 7: Error: In SetBodyPageUsage(), invalid page number 0 Composing record #1, input record 1, repeat 1 of 26 Sheet #1, record #1
  9. Thanks step, That works good to make a simpler rule but then I would have to go through and change all the pages to unused. Was hoping for something easier. May use this kind of thing for hundreds of pages. May have to look into another program to accomplish this.
  10. Step, I tried your rule for my scenario since no one else has responded to what I was trying. So my code looks like this to get my 26 page PDF imposed using my imposition file. FusionPro.Composition.repeatRecordCount = 26; FusionPro.Composition.SetBodyPageUsage(1, FusionPro.Composition.repeatRecordNumber == 1); FusionPro.Composition.SetBodyPageUsage(2, FusionPro.Composition.repeatRecordNumber == 2); FusionPro.Composition.SetBodyPageUsage(3, FusionPro.Composition.repeatRecordNumber == 3); FusionPro.Composition.SetBodyPageUsage(4, FusionPro.Composition.repeatRecordNumber == 4); FusionPro.Composition.SetBodyPageUsage(5, FusionPro.Composition.repeatRecordNumber == 5); FusionPro.Composition.SetBodyPageUsage(6, FusionPro.Composition.repeatRecordNumber == 6); FusionPro.Composition.SetBodyPageUsage(7, FusionPro.Composition.repeatRecordNumber == 7); FusionPro.Composition.SetBodyPageUsage(8, FusionPro.Composition.repeatRecordNumber == 8); FusionPro.Composition.SetBodyPageUsage(9, FusionPro.Composition.repeatRecordNumber == 9); FusionPro.Composition.SetBodyPageUsage(10, FusionPro.Composition.repeatRecordNumber == 10); FusionPro.Composition.SetBodyPageUsage(11, FusionPro.Composition.repeatRecordNumber == 11); FusionPro.Composition.SetBodyPageUsage(12, FusionPro.Composition.repeatRecordNumber == 12); FusionPro.Composition.SetBodyPageUsage(13, FusionPro.Composition.repeatRecordNumber == 13); FusionPro.Composition.SetBodyPageUsage(14, FusionPro.Composition.repeatRecordNumber == 14); FusionPro.Composition.SetBodyPageUsage(15, FusionPro.Composition.repeatRecordNumber == 15); FusionPro.Composition.SetBodyPageUsage(16, FusionPro.Composition.repeatRecordNumber == 16); FusionPro.Composition.SetBodyPageUsage(17, FusionPro.Composition.repeatRecordNumber == 17); FusionPro.Composition.SetBodyPageUsage(18, FusionPro.Composition.repeatRecordNumber == 18); FusionPro.Composition.SetBodyPageUsage(19, FusionPro.Composition.repeatRecordNumber == 19); FusionPro.Composition.SetBodyPageUsage(20, FusionPro.Composition.repeatRecordNumber == 20); FusionPro.Composition.SetBodyPageUsage(21, FusionPro.Composition.repeatRecordNumber == 21); FusionPro.Composition.SetBodyPageUsage(22, FusionPro.Composition.repeatRecordNumber == 22); FusionPro.Composition.SetBodyPageUsage(23, FusionPro.Composition.repeatRecordNumber == 23); FusionPro.Composition.SetBodyPageUsage(24, FusionPro.Composition.repeatRecordNumber == 24); FusionPro.Composition.SetBodyPageUsage(25, FusionPro.Composition.repeatRecordNumber == 25); FusionPro.Composition.SetBodyPageUsage(26, FusionPro.Composition.repeatRecordNumber == 26); Anyone know if there is a way to write a loop for each page in the PDF template instead of having to add a line in the rule for each page? TIA
  11. I am trying to do something similar and thought Fusion Pro could do it. I have a 30 page PDF of one-ups that is ready to go and I just want to impose it to 15 per imposed sheet and I can't seem to do it.
  12. Well what I was going to try won't work anyway. Why not just have your FP template be 17X11 and place your two 8.5 X 11 pages side by side since they are all two pages?
  13. So are all records going to be two pages?
  14. Do you have an example of what you are trying to accomplish? Are all records two pages or does the page count vary?
  15. So I changed my rule to this. I get the header but I then lose my first row of data. Any Ideas how to fix? var XDF = new ExternalDataFileEx("84384_List.csv", "\,"); var firstItemColumn = 11; // "Apple Computers & Monitors" var myTable = new FPTable; myTable.AddColumns(4800, 31200, 4800); for (var row = firstItemColumn; row <= XDF.fieldCount; row++) { var itemCount = Int(XDF.GetFieldValue(CurrentRecordNumber(), row)); if (itemCount) { var thisRow = myTable.AddRow(); for (var cell = 0; cell < myTable.Columns.length; cell++) { var thisCell = thisRow.Cells[cell]; thisCell.SetBorders("Thin","Black","Top","Bottom","Right","Left"); thisCell.HAlign = "Center"; thisCell.Margins = { Top:40, Bottom:40 }; } var header = XDF.GetFieldValue(0, row); thisRow.SetContents(header.substr(0,2), header.substr(3), itemCount); } } [color=red]myTable.Rows[0].Type = "Header";[/color] [color=red]myTable.Rows[0].Cells[0].Font = "Myriad Pro Black"; myTable.Rows[0].Cells[0].PointSize = 12; myTable.Rows[0].Cells[0].Content = "CODE"; myTable.Rows[0].Cells[1].Font = "Myriad Pro Black"; myTable.Rows[0].Cells[1].PointSize = 12; myTable.Rows[0].Cells[1].Content = "DESCRIPTION"; myTable.Rows[0].Cells[2].Font = "Myriad Pro Black"; myTable.Rows[0].Cells[2].PointSize = 12; myTable.Rows[0].Cells[2].Content = "QTY";[/color] return myTable.MakeTags();
  16. So I am trying to change this table rule to also include a header for my three columns. I had originally just had the headers for each column above my table in text boxes. Well now some of these tables are getting larger and I need overflow pages to also have the header. Can I add a header to the table rule? Below is my current code. TIA var XDF = new ExternalDataFileEx("84384_List.csv", "\,"); var firstItemColumn = 11; // "Apple Computers & Monitors" var myTable = new FPTable; myTable.AddColumns(4800, 31200, 4800); for (var row = firstItemColumn; row <= XDF.fieldCount; row++) { var itemCount = Int(XDF.GetFieldValue(CurrentRecordNumber(), row)); if (itemCount) { var thisRow = myTable.AddRow(); for (var cell = 0; cell < myTable.Columns.length; cell++) { var thisCell = thisRow.Cells[cell]; thisCell.SetBorders("Thin","Black","Top","Bottom","Right","Left"); thisCell.HAlign = "Center"; thisCell.Margins = { Top:40, Bottom:40 }; } var header = XDF.GetFieldValue(0, row); thisRow.SetContents(header.substr(0,2), header.substr(3), itemCount); } } return myTable.MakeTags();
  17. If you create a new static PDF you could just import all your Fusion Pro elements doing the following. Open the new PDF in Acrobat. Go to define data source and use the import data source from another document. Then locate the .def file from the original Fusion Pro template. Then go to advanced and import. Locate your original Fusion Pro template PDF. This will bring in all rules and that original data source. This should be fairly quick and easy.
  18. How can I adjust my existing rule: return Field("Email").replace(/@/g,'<span pointSize="7"font="Monaco">@</span>'); To add superscripting of the @ symbol. The font wanted doesn't line up on the baseline with the text font so I thought I could use superscripting to get it inline. I have this rule for superscripting but need a little help on how to combine the two correctly. var s = Field("Email"); return s.replace(/\@/g,"<superscript>@</superscript>"); TIA
  19. I used this in the past. May work. function replace_helper(match, digits, spaces) { return '<f name="MrEavesModOT">' + digits + '</f>' + Array(spaces.length + 1).join(" "); } return Field("YOURFIELDHERE").replace(/(\d+)(\s*)/g, replace_helper); Using MrEavesSanOT for your variable field in the text box.
  20. I tried your template and record one composed fine with 57 pages.
  21. Sorry can't help with the rule. I normally do this kind of work in the data since I am not a JavaScript guru!!
  22. Should be able to use a simple text editor and do a find and replace.
  23. You could just replace the "&" with "&" in your data and check the "Treat returned strings as tagged text" check box in your rule.
×
×
  • Create New...