First time here? Check out the FAQ!
Is there a console app (ie command line) to convert standard document types to .txt file? Also, can .docx be converted?
Would it be necessary for users to have LbreOffice installed?
Hi @TWmailrec,
You may use LibreOffice on the command line to convert various document types to plaintext. Note that plaintext doesn't have any special formatting, so you'll want to experiment with some of your more complicated documents to see how cleverly things like bullets, tables, images, etc... are handled.
To convert a document to text, first make sure that LibreOffice isn't currently running, then use the following on the commandline:
soffice --headless --convert-to txt:Text YOUR-DOCUMENT-HERE.DOC
(I've been told that on Windows you should use "-convert-to" instead of "--convert-to"; I'm not sure if the same applies to the "--headless" parameter)
For more information about using LO on the commandline, see the answers to this question:
In GNU/Linux there is command line program odt2txt which converts odt (OpenDocument Text), ods (OpenDocument Spreadsheet), odp (OpenDocument Presentation) and sxw (OpenOffice.org XML) to txt.
To use it, you don't need to have LibreOffice installed.
LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!
Asked: 2012-04-03 10:46:48 +0200
Seen: 355 times
Last updated: Jan 24
How do I install new fonts to LibreOffice Writer?
How can I get a split view of a document (like in MS Word) ?
Writer: Unwanted Page Breaks before Linked HTML Sections
how to create an keyboard shortcut for "add appear effect"
LO 3.5.4.2 - Writer spell check doesn't work.
Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.