Copy link to clipboard
Copied
Jongware provided two ideas for forcing a table's rows and columns into heights and widths smaller than the Indesign preset 1.058mm.
For rows: app.selection[0].properties = {autoGrow:false, height:"0.5mm"};
And for columns he sugested: app.selection[0].width = "0.5mm";
The problem is that while the code for rows works perfectly, the one for columns returns an error "Expected Unit, but received 0.5mm" I'm running Indesign cs6. Anyone has any insights to help fixing such script, or maybe some different approach? Thanks!
Hm, other than using InDesign CS5.5 or below with scripting?
Or export IDMS, open and edit (by script of course, it's just a plain text file in disguise), place IDMS and replace table?
(IDML as an alternative)
No.
Uwe
Copy link to clipboard
Copied
Hi,
What is actually selected while executing a 2nd idea?
Did you try it with a table's column selected?
Jarek
Copy link to clipboard
Copied
Yes. I have tried with a single cell selected, a whole column, a whole row, the whole table. Always the same error.
Copy link to clipboard
Copied
If the cell's insets are all set to 0, I have no problem with Jongware's code.
But this was InDesign CS5.5.
With CS6 v8.0.2 there will be an error!
app.selection[0].cells.everyItem().width = "0.5 mm"; //ERROR in CS6, will work in CS5.5
Or will fail silently for the setting a value for width , if more than one property, the width, is applied over:
app.selection[0].cells.everyItem().properties = {autoGrow:false, width:"0.5 mm", height:"0.5 mm"};
InDesign CS5.5 screenshot:
I think we have a bug here…
Uwe
Copy link to clipboard
Copied
I was hoping no one would label it as a bug, as this means there is no viable solution.
Do you think upgrading to CC would solve it?
Copy link to clipboard
Copied
With InDesign CC it's the same.
Bug present. Width will not change, if value less than 1.06 mm.
Hm.
The solution would be a snippet file export, editing that snippet and place it again.
The property inside the idms file to edit would be:
SingleColumnWidth
Now I changed that to:
Name="0" SingleColumnWidth="1.4173228346456694"
Name="1" SingleColumnWidth="1.4173228346456694"
//… etc. depends on how much columns this table has.
Placed the edited snippet and width is 0.5 mm now.
Uwe
Copy link to clipboard
Copied
Althought that really solved it, I can't declare it a feasible solution because the amount of time I would spend doing that would render the work impossible to complete. Kudos to your workaround, Uwe.
Would you say there is no script to solve it than? I just might have to give up on the project
Copy link to clipboard
Copied
Hm, other than using InDesign CS5.5 or below with scripting?
Or export IDMS, open and edit (by script of course, it's just a plain text file in disguise), place IDMS and replace table?
(IDML as an alternative)
No.
Uwe
Copy link to clipboard
Copied
Hi,
Never give up!
What is the reason to set so tight columns in your project?
Jarek
Copy link to clipboard
Copied
Space is really an issue in this project, and that 0.5mm gain relative to the minimum, believe it or not, is going to allow more information to be placed on the print out.
It's really a shame that bugs like this one end up appearing and taking so long to be found. But it's even a greater shame that they affect so few people that they'll most likely never be corrected!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
My bug report was dismissed.
Reason: "Not a bug".
But I will do another one, because as we can see with IDML and IDMS that indeed InDesign is able to handle width values less than 1.059 mm.
Only the GUI will block these values. And: The height of a table cell can be scripted to less than 1.059 mm. Why restricting the width then?
This is also true with other limits in values:
One example is the limit on the maximum value of the slug area.
Fortunately the slug area is still expandable by scripting; even with InDesign CC-2015.
Uwe