Copy link to clipboard
Copied
I'm hoping I can get away with asking this question without posting a bunch of code, if you think the code would help you answer then I'd be more than happy too, as for now though I'm going to assume it obfuscates what I'm asking.
I've noticed a strange behaviour when resizing text in CS5.
OK so I've got it so that I can collect all of the data I want, store it into arrays. I then place those arrays contents element by element into an InDesign document. When the textframe overflows I create a new page, erase the most previous row and move it to the first row of the newly created page.
The problem I'm encountering is in the reflowing behaviour of the table cells. In some cases the cell will resize appropriate to the contents, in other instances InDesign will indicated that the cell has overset text by showing a little red dot in the bottom corner. If the table cell is horizontally resized eventually the contents will become displayed, way off the page. If the table cell is vertically resized the cell will continue to indicate that it contains overset text.
Upon further investigation I noticed that when a cell is resized to the page bounds the text will be automatically reflowed if the contents flow over the side of the page, however if the contents only flow into the margin but not over the page edge I get a red dot. The cause of this behaviour is further confirmed by erasing just enough content from a cell that once reflowed perfectly so that it stops reflowing, the magic mark again is that the moment the contents flow within the page the contents stop reflowing.
I can't really think of a work around for this either, if I simply increase the size of the row vertically the contents are not reflowed, and horizontally items are printing within the margin. Is there a way to set the reflow options of a cell to reflow even if the contents could fit within the margin?
The picture on the right simply shows that when the table width is increased to to the edge of the page if the contents don't extend beyond it the red dot shows up and the overset text does not reflow, as evidenced on the left.
I'd appreciate any and all help with this question.
Thanks
Copy link to clipboard
Copied
I found a nasty work around. When I place the row, I check if it overflows, if so then I add a single space character to the end and the vertical sizing adjusts automatically.
Cause that makes sense.... (insert sarcasm)
Copy link to clipboard
Copied
it makes somewhat sense because of how the paragraph composer works.
you can also try something like cell.texts[0].recompose();
Copy link to clipboard
Copied
I'll try out recompose.
How does the paragraph composer work? Or perhaps a more fair question would be how does one learn how the paragraph composer works? I find more and more I ask myself why something works the way it does.
Copy link to clipboard
Copied
Recompose doesn't seem to change anything. I've also found that one space doesn't seem to be enough for all cells. 5 spaces seems to do the trick. If it's for print it's fine, haha I can only imagine if someone inherits the indesign document they'll be shaking their heads as to why some dolt put five spaces at the end of every row!