1 Reply Latest reply on May 19, 2010 12:09 AM by Marijan Tompa [tomaxxi]

    setting table/cell strokes to overprint

    PascalDobbelaere

      is there a way to ad line in following script to set cell strokes in overprint?

       

      this script has been very useful to me (thanks to Jongware (http://forums.adobe.com/message/2818852#2818852)) but it's missing the overprint feature for strokes.

       

      table = app.selection[0];
      if (table.hasOwnProperty("baseline"))
      table = table.parent;
      if (table instanceof Cell)
      table = table.parent;
      if (table instanceof Column)
      table = table.parent;
      if (table instanceof Row)
      table = table.parent;
      if (!(table instanceof Table))
      {
      alert ("Echt niet in een tabel!");
      exit(0);
      }
      color = table.cells[0].characters[0].fillColor;
      black = app.activeDocument.swatches.item("Black");
      table.cells.everyItem().properties = {
      topEdgeStrokeColor:color,
      bottomEdgeStrokeColor:color,
      leftEdgeStrokeColor:color,
      rightEdgeStrokeColor:color };
      for (aCell=0; aCell<table.cells.length; aCell++)
      if (table.cells[aCell].fillTint == 50)
        table.cells[aCell].fillColor = color;

       

      tia, Pascal

        • 1. Re: setting table/cell strokes to overprint
          Marijan Tompa [tomaxxi] Level 4

          Hey!

           

          It's easy to solve your problem.

          In red is what you have to add...

           

           

          table =  app.selection[0];

          if  (table.hasOwnProperty("baseline"))

          table = table.parent;

          if  (table instanceof  Cell)

          table = table.parent;

          if  (table instanceof  Column)

          table = table.parent;

          if (table instanceof Row)

          table = table.parent;

          if (!(table instanceof  Table))

          {

          alert ("Echt niet in een tabel!");

          exit(0);

          }

          color =  table.cells[0].characters[0].fillColor;

          black =  app.activeDocument.swatches.item("Black");

          table.cells.everyItem().properties  = {

          topEdgeStrokeColor:color,

          bottomEdgeStrokeColor:color,

          leftEdgeStrokeColor:color,

          rightEdgeStrokeColor:color,

          bottomEdgeStrokeOverprint:true,
          leftEdgeStrokeOverprint:
          true,
          rightEdgeStrokeOverprint:
          true,
          topEdgeStrokeOverprint:
          true};

          for (aCell=0;  aCell<table.cells.length; aCell++)

          if (table.cells[aCell].fillTint == 50)

             table.cells[aCell].fillColor = color;

           

          tomaxxi