-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table too wide for document #11
Comments
Hi Charl, what I would do would be to see what Word does when you set it the way you want and try to duplicate that. One way to do that is to use opc-diag to browse a before and after version of the .docx file. The command would be something like this: $ opc diff-item before.docx after.docx document.xml I expect the difference comes down to a few elements and/or attributes in the table properties XML. If you can narrow it down to those specifics I can give you a couple lines of code to put that XML in place. You can wrap that in a function or method and call it in the right spot in your code. Once we have it working we can noodle a bit what the API for doing it directly from the library wants to look like and then we can add it to the backlog. Want to give that a shot? |
Thanks for responding so quickly! I'd like to try that. However, here I have only LibreOffice 4.1.4.2 to test the DOCX, and that generates a whole lot of extra code in the resultant file. Tomorrow at work I hope to be able to test with a real-deal Word and look at the differences. |
A kind colleague just checked with MS Word and there it renders correctly. Sorry for the disturbance. Hopefully this closed issue report will help other LibreOffice users in the future. :) Thanks again, |
No worries, thanks Charl :) |
prepend and append comment elements instead of inserting them inside <w:r>
I'm creating a docx containing a table with three columns, some of them containing 80 characters of text.
When I open the doc, the first column of the table is wider than the page. When I select table properties and set the width to relative and 100%, it fits the whole table nicely and wraps the text where necessary.
Is there a way to specify the width of the created table to 100% relative?
At the moment I'm digging around in docx/oxml/table.py and using this http://www.docx4java.org/forums/pdf-output-f27/pdf-conversion-table-width-t1233.html as a hint, but pointers would be greatly appreciated!
The text was updated successfully, but these errors were encountered: