Page 1 of 1

[Solved] Rows Height problem

PostPosted: Sat Jan 23, 2016 4:23 pm
by Koskha
Hello, im new in the forum :)
I'm here because I have a big problem... I'm a programmer and my software is writing directly into an OpenOffice's .RTF file some values that I load from a DataBase and I need to save, print etc using OpenOffice.
So when I write my data into the rtf file it's all OK (I have one page with an Header, a footer and a big table in the middle 6x27), I must use only one page and can't use another. So when there is a lot of datas for example a name of 32 characters the cell do an autosize and the table turns bigger so it doen't fit more on a page. Is there a way to lock cell sizes, overflowing the text out (turning it "invisible")?

Sorry for my bad English,
Thank you in advance

Re: Rows Height problem

PostPosted: Sat Jan 23, 2016 6:51 pm
by RusselB
While this doesn't directly answer your question, and I admit that I'm not aware of a way of doing what you're asking for, I would like to point out that OpenOffice does not handle .rtf (Rich Text Format) files very well.
The usual recommendation is to suggest that you use the Open Document Format, which, for writer, is .odt
This may help with your problem, but I don't know.

Re: Rows Height problem

PostPosted: Sat Jan 23, 2016 8:22 pm
by Koskha
RusselB wrote:While this doesn't directly answer your question, and I admit that I'm not aware of a way of doing what you're asking for, I would like to point out that OpenOffice does not handle .rtf (Rich Text Format) files very well.
The usual recommendation is to suggest that you use the Open Document Format, which, for writer, is .odt
This may help with your problem, but I don't know.


It's too hard to implement my code to work with .odt files because the file structure is different and encoded in ways i don't know.
If there isn't a way to do it in rtf I have to do a lot of work.
So if someone knows how to do it please reply to this topic. Thanks :)

Re: Rows Height problem

PostPosted: Tue Jan 26, 2016 1:17 am
by musikai
I'm also not sure what exactly you need but in OO you can set the Row to a fixed size and to not autoadjust. If the cell overflows it will be shown with a little red arrow.
I saved this as rtf and then again opened this rtf and this settings was still intact. So theoretically you should be able to find the corresponding part in the rtf if you look at it in a text editor.

Re: Rows Height problem

PostPosted: Tue Jan 26, 2016 8:40 am
by Koskha
musikai wrote:I'm also not sure what exactly you need but in OO you can set the Row to a fixed size and to not autoadjust. If the cell overflows it will be shown with a little red arrow.
I saved this as rtf and then again opened this rtf and this settings was still intact. So theoretically you should be able to find the corresponding part in the rtf if you look at it in a text editor.


That's esactly what I need, how can I set fixed size to the row?

Re: Rows Height problem

PostPosted: Tue Jan 26, 2016 9:45 am
by keme
Koskha wrote:... how can I set fixed size to the row?

  • Right click in the table row and select Row - Heigth... in the context menu.
  • Enter the heigth you need, and untick the auto-adjust box.

Re: Rows Height problem

PostPosted: Tue Jan 26, 2016 2:08 pm
by musikai
Yep, as keme explained.
I already was going to go in in the footsteps of Sherlock Holmes creating different documents and searching through the differences when Watson told me to better read the instruction leaflet.
So you should find the solution in Microsofts own specs:
https://www.microsoft.com/en-us/downloa ... x?id=10725

Therin search for "Row Formatting". I suppose the switch is:
\trrhN

example: \trrh-567
explanation:
Height of a table row in twips. When 0, the height is sufficient for all the text in the line; when positive, the height is guaranteed to be at least the specified height; when negative, the absolute value of the height is used, regardless of the height of the text in the line.

Re: Rows Height problem

PostPosted: Fri Feb 05, 2016 5:00 pm
by Koskha
Thanks to all, I made it doing Row->Height, unchecking the auto-size box and then set a fixed height :D