Jump to content

tou

Registered Users - Approved
  • Posts

    112
  • Joined

Everything posted by tou

  1. With your graphics files (PDF, JPeg, Tiff, etc), if you have them premade already, you can also create the following rules: top line - text rule bottom line with graphic - text rule your textbox would be the following: <top line rule> <NAME> <TITLE> <EMAIL> <bottom line with graphic rule> Grahic rules scripting (treat return strings as tagged text): <graphic file="YOUR GRAPHIC FILE NAME/RESOURCE HERE">
  2. Sweet. I knew it could be done more concisely! (¬‿¬)
  3. Looks like you'll have to code 2 rules.... Rule # 1 - line1 Rule # 2 - line2 line1 (var a,b,c,d,e,f are for testing only and should point to your field - I've used static strings for testing) var a="A" var b="" var c="C" var d="D" var e="E" var f="F" var fields = [a,b,c,d,e,f].filter(String); var myTable = new FPTable; if (fields.length == 1) var cols = 1 else if (fields.length == 2) var cols = 2 else if (fields.length == 3) var cols = 3 else if (fields.length == 4) var cols = 2 else if (fields.length == 5) var cols = 3 else var cols = 3 if (cols == 1) { myTable.AddColumns(32328); var myRow = myTable.AddRow(); myTable.HAlign = "Center"; myRow.Cells[0].HAlign = "Center"; myRow.Cells[0].Content = fields[0]; } else if (cols == 2) { myTable.AddColumns(16164, 16164); var myRow = myTable.AddRow(); myTable.HAlign = "Center"; myRow.Cells[0].HAlign = "Center"; myRow.Cells[1].HAlign = "Center"; myRow.Cells[0].Content = fields[0]; myRow.Cells[1].Content = fields[1]; } else { myTable.AddColumns(10776, 10776, 10776); var myRow = myTable.AddRow(); myTable.HAlign = "Center"; myRow.Cells[0].HAlign = "Center"; myRow.Cells[1].HAlign = "Center"; myRow.Cells[2].HAlign = "Center"; myRow.Cells[0].Content = fields[0]; myRow.Cells[1].Content = fields[1]; myRow.Cells[2].Content = fields[2]; } return myTable.MakeTags(); line 2 (var a,b,c,d,e,f are for testing only and should point to your field - I've used static strings for testing) var a="A" var b="" var c="C" var d="D" var e="E" var f="F" var fields = [a,b,c,d,e,f].filter(String); var myTable = new FPTable; if (fields.length == 1) var cols = 1 else if (fields.length == 2) var cols = 2 else if (fields.length == 3) var cols = 3 else if (fields.length == 4) var cols = 2 else if (fields.length == 5) var cols = 2 else var cols = 3 if (cols == 1) { } else if (cols == 2) { myTable.AddColumns(16164, 16164); var myRow = myTable.AddRow(); myTable.HAlign = "Center"; myRow.Cells[0].HAlign = "Center"; myRow.Cells[1].HAlign = "Center"; if (fields.length == 4) { myRow.Cells[0].Content = fields[2]; myRow.Cells[1].Content = fields[3]; } else if (fields.length == 5) { myRow.Cells[0].Content = fields[3]; myRow.Cells[1].Content = fields[4]; } } else { if (fields.length > 3) { myTable.AddColumns(10776, 10776, 10776); var myRow = myTable.AddRow(); myTable.HAlign = "Center"; myRow.Cells[0].HAlign = "Center"; myRow.Cells[1].HAlign = "Center"; myRow.Cells[2].HAlign = "Center"; myRow.Cells[0].Content = fields[3]; myRow.Cells[1].Content = fields[4]; myRow.Cells[2].Content = fields[5]; } } return myTable.MakeTags(); In your text box, stack the two variables on top of each other.
  4. I'm getting the attached results for 5 location testing. Cool!
  5. You can always do it with more coding.... Assuming that when two fields are populate it's the first 2 location and so on....code it backwards... if (Field("Location 6") != "") { YOUR 6 LOCATION CODE GOES HERE } else if (Field("Location 5") != "") { YOUR 5 LOCATION CODE GOES HERE } else if (Field("Location 4") != "") { YOUR 4 LOCATION CODE GOES HERE } else if (Field("Location 3") != "") { YOUR 3 LOCATION CODE GOES HERE } else if (Field("Location 2") != "") { YOUR 2 LOCATION CODE GOES HERE } else if (Field("Location 1") != "") { YOUR 1 LOCATION CODE GOES HERE } If your locations are not always populated from 1 to 6 filled incrementally, you'll have to code more variables to handle it. Good luck.
  6. Adding a row does not need to be "var": var myRow = myTable.AddRow(); should be just (in both cases.....): myTable.AddRow(1); Rows can be specified like the following: myTable.Rows[0].Cells[0].Content = Field("Location 1"); myTable.Rows[0].Cells[1].Content = Field("Location 2"); myTable.Rows[0].Cells[2].Content = Field("Location 3"); The locations 4 through 6 should be coded like the following myTable.Rows[1].Cells[0].Content = Field("Location 4"); myTable.Rows[1].Cells[1].Content = Field("Location 5"); myTable.Rows[1].Cells[2].Content = Field("Location 6"); I think that should do it. Good luck.
  7. Sounds good Step. Thanks! ヾ(⌐■_■)ノ♪
  8. Can we set crop marks to a spot color if we wanted to using FusionPro Impositioning? For example we had a black piece and printed metallic ink, but FPI was printing black, so had to use original PDF's crop marks (changed to metallic manually within PDF) to get the metallic ink to print. Just wondering....not an every second issue...wondering if options are editable for crop marks (thickness, color, etc)
  9. mid function can be used too.... var a = Mid(YOURFIELD,1,1) var b = Mid(YOURFIELD,2,1) var c = Mid(YOURFIELD,3,1) return a+<p>+b+<p>+c // have return return strings as tagged text checked. or to make it more dynamic... var howMany = 3 var collectText = "" for (c = 0; c < howMany; c++) collectText += Mid(YOURFIELD,c+1,1)+"<p>"; return s; // have return return strings as tagged text checked.
  10. Oh, I'm sorry. I'm using FusionPro VDP Creator 9.3.21....it must be different...sorry
  11. Make sure "Ignore Record Repeat during Composition" is not checked on "input" tab of composition settings.
  12. I don't know where you are using "var copies = 50", but I'm assuming you need a copy count somewhere. I don't think you need anything else in the onRecordStart rule and can be just the following: FusionPro.Composition.repeatRecordCount = 50 If you have a data file, you can lose the onJobStart rule.
  13. your onJobStart should reference the total number of coupons only... var totalCoupons = 1875; //Enter the number of total coupons FusionPro.Composition.composeAllRecords = false; FusionPro.Composition.startRecordNumber = 1; FusionPro.Composition.endRecordNumber = totalCoupons; your onRecordStart should be set to allow infinite stack to be set: FusionPro.Composition.chunksBreakStacks = true your serial # should use the system record # which is 1 and increment it by your starting coupon number: return CurrentRecordNumber()+69000; If you want to start at 69000, set 69000 to 68999.......or throw in a "-1" after the "69000" above. I think you can call global variables, but you'll need a onRecordEnd to increment it? I don't know global variables too well at this point. Sorry. Hopes this helps. Output.pdf
  14. if you go into your text box and click paragraph settings, you will have to play with 1st line indent and left indent. 1st line indent is less than left indent....set your left indent to the distance of where your tab is going to be so when a line wraps it aligns up. What I usually do is type something up in word and format it like so, then paste it into the text box, then checking paragraph settings to see how I can mimic the looks. Pages from OUTPUT TEST.pdf Pages from OUTPUT TEST-composed.pdf
  15. I came up with a code: // Build a string of the letters A through Z s = "my.name-cms@google-analytics.com" var a = "" var b = Len(s) var passedAtSign = 0 var printUpperChr = 0 for (c = 0; c < b; c++) { // checks to see if we are passed our @ sign if (Mid(s, c+1 ,1)=="@") passedAtSign = 1 // Upper case 1st character of email if (c==0) a = a + ToUpper(Mid(s, c+1 ,1)) else { // if after 1st pass it's a period or dash, // toggle printUpperChr should be set to 1 // and if not passed the @ sign, passedAtSign // should still be 0 at this point if (printUpperChr == 1 && passedAtSign==0) a = a + ToUpper(Mid(s, c+1 ,1)) else a = a + ToLower(Mid(s, c+1 ,1)) //flags to print next character upper if (Mid(s, c+1 ,1)=="." || Mid(s, c+1 ,1)=="-") printUpperChr = 1 else printUpperChr = 0 } } return a; and came up with the results of: My.Name-Cms@google-analytics.com Hopes this helps....
  16. Very nice.....hopefully there's other text box beautifying tricks on later versions of FP.highlight name trick-output.pdf
  17. Sounds good. Sorry was in the middle of composing the reply and didn't see your response to Alex. Happy findings!
  18. As Alex mention create a text rule making sure to check "treat return strings as tagged text". Following code I've used for 2D code, just swapped out DataMatrixBarcode and use QRBarcode instead: //var barcode = new DataMatrixBarcode; var barcode = new QRBarcode; barcode.processTilde=false; barcode.preferredFormat = 3; barcode.encodingMode="ASCII"; barcode.pointSize=7; return barcode.Make(Field("f1")); Insert the variable into a text frame and apply the spot color you created to it. In preview it works for me and attached is the PDF I generated. test.pdf
  19. That works great! How would we print the current record number in this case? (records 1 - 9) Thanks Ste!
  20. my test attached. sorry I couldn't be more of an assistance. 2PAGE - Copy.zip
  21. I tried Ste's method and got 16200 pages so I'm sorry I don't know what's happening. Good luck!
  22. My setup is a tad bit different....2 page template: pulling page 1,2 for record 1 pulling page 3,4 for record 2 ....and so on So I'm not sure. Sorry. I will test an 18 page document out for the moment.
  23. Attached is my testing.... For the numbering you will have to create a rule and populate with with: return FusionPro.Composition.repeatRecordNumber; OUTPUT TEST.PDF
  24. PPML generates a zip file. In the other apps of the VDP world, I've created PPML with flattened down PDFs and swapped them out after the *.zip file is created. You just have to make sure that the HighRes PDF or Transparent PDF is the same file name. Not sure if it will work, but it's an application thing and will not build your PPML files for you. All in all, please make sure the printing looks correct.
×
×
  • Create New...