This content has been marked as final. Show 5 replies
for first problem - try this:
thanks! This seems to work (any clue where the difference is?).
For my second Problem:
I am adding a Rectangle now at the first InsertionPoint in the needed cell.
How would I position the Rectangle to ignore the Cell's padding and not to interfere with the existing content?
Could I still put the Rectangle on another layer (even if anchored)?
empty Cell or Cell with overset - don't have contents - parent .Texts.Item(1) object - it is always and always hold contents of Cell (even if Cell is empty - there is one InsertionPoint)
Anchored objects can't be moved to different layer
the solution - it depends of what you try to achieve and how stable is contents of your document, etc.
I managed to create an ObjectStyle that positions the Rectangle correctly. Then I do sendToBack()
Hope this does the trick...
Another issue is that now I need to place an image (EPS) on the Rectangle but this doesn't work using:
topLeftStyle = app.activeDocument.objectStyles.item("top_left_arrow");
var rightPageImg = new File("tbl_continued-right.eps");
var firstInsert = table.rows.cells.texts.insertionPoints;
var firstRect = firstInsert.rectangles.add();
firstRect.place(rightPageImg); //<-- ERROR HERE
why you try to add Rectangle to First cell in table - rather first cell on current page ? ;)
do you see newly added Rectangle in first cell in table?
you can't place image to invisible Rectangle
if you add Rectangle to cell and it is to big to fit in cell - cell will be overset and you will get error when you try to place image in invisible rectangle
- add new Rectangle somewhere on any page,
- place your image,
- resize it, rescale, whatever :)
- make reference to it (A),
- now, when you will process your tables - every time when you need to add this arrow: select (A), copy it, select insertion point, place :)
this will speed up your script :)
if you don't use copy/paste in your script - you can just use only "select destination insertion point" and "place" command - your Rectangle is in clippoard :)