Apache OpenOffice Community Forum in that other very valuable forum.See the recent related thread Opening text docs in OpenOffice (View topic) You need to load the character style you want from a template during the process. (Don’t think it’s OS dependent - except for the syntax of the template’s pathname, of course.) For instance, for Liberation Mono, it defines a substitute font in the generated docx (see word/fontTable.xml), which is Courier New as well as the font properties (fixed-pitch “modern” font), which allows to find proper substitutions on any system. LibreOffice is quite smart when it comes to default fonts it uses, which are possibly not available on other systems. To convert a UTF8-encoded plain-text file with default line endings, using Courier New font, and English (USA) language for the imported text. So, the command line could be like this: soffice -infilter="Text (encoded):UTF8,Courier New,en-US" -convert-to docx path/to/file.txt LF is line ending format ( CR and CRLF are the other allowed options if missing, CRLF is used on Windows, and LF on all other platforms). UTF8 is encoding used to decode the file.The help didn’t specify what were those missing parameters after LF (now I added that, and it will go to the next help version), but here they are: LibreOffice help includes an example for conversion from plain text file: -infilter="Text (encoded):UTF8,LF," It is very easy to define font name when converting from plain text files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |