The command 'convert-to' does not seem to work when the required output is plain text ('.txt')
rtf and html conversion works. Not sure if a plain text converter exists. Possible workaround: convert to pdf then use pdftotext to extract the text. Please have a look to bug 82188. Best regards. JBF
Hi, Currently you can use: --convert-to txt:Text *** This bug has been marked as a duplicate of bug 38511 ***
(In reply to comment #2) > Hi, > > Currently you can use: --convert-to txt:Text > > *** This bug has been marked as a duplicate of bug 38511 *** This command opened a pdf document in lo draw! The desired action is to convert to text via the command terminal.
(In reply to comment #3) > This command opened a pdf document in lo draw! What is the format of the source file your'e trying to convert? Can you post the complete command you tried?
(In reply to comment #4) > (In reply to comment #3) > > This command opened a pdf document in lo draw! > What is the format of the source file your'e trying to convert? Can you post > the complete command you tried? Lo writer opened, new odt created containing only: test text saved as ~/tmp/test.txt libreoffice --convert-to txt:Text text.odt Writer opens from the command terminal, no new text file is created at the command terminal.
(In reply to comment #5) > saved as ~/tmp/test.txt I guess it's a typo, and should be test.odt? > libreoffice --convert-to txt:Text text.odt Another typo I hope - should be test.odt (not text.odt). > Writer opens from the command terminal I you don't want the gui to show up, you must add '--headless'. > no new text file is created at the command terminal. Do you get any output in the terminal?
(In reply to comment #6) > (In reply to comment #5) > > saved as ~/tmp/test.txt > I guess it's a typo, and should be test.odt? > Correct: to clarify the filename contained 'test text', saved as 'test.odt' > > libreoffice --convert-to txt:Text text.odt > Another typo I hope - should be test.odt (not text.odt). > Yes. > > Writer opens from the command terminal > I you don't want the gui to show up, you must add '--headless'. > This is not necessary with -convert-to ... (notice only one dash (-) character at start > > no new text file is created at the command terminal. > Do you get any output in the terminal? Correction: new observations with --convert-to txt:Text test.odt the gui starts and shows the file with -convert-to txt:Text test.odt conversion at the command terminal is successful, without the need to specify 'headless'. This should be added to the help manual (especially the local copy, not everyone has constant internet access)
(In reply to comment #7) > > I you don't want the gui to show up, you must add '--headless'. > This is not necessary with > > -convert-to ... > > (notice only one dash (-) character at start This is not the case for me. > This should be added to the help manual (especially the local copy, not > everyone has constant internet access) -convert-to is deprecated. You must be using a very old (and thus unsupported) version.