4

I am using the following libreoffice command to convert my pdf files into word(doc)

lowriter --headless --infilter='writer_pdf_import' --convert-to doc:"MS Word 2007 XML" sample.pdf

After converting the output document is having each line bordered with a rectangular box. But if I use the same command with MS Word 97 it is working perfectly.

 lowriter --headless --infilter='writer_pdf_import' --convert-to doc:"MS Word 97" sample.pdf

I don't know what is the mistake in the first command. Please help me with this. And also suggest me if I need to add any other attributes that will improve the efficiency and quality of conversion.

3
  • Thanks a lot for helping. But I need some command to convert the files. The post you shared is for converting the files using GUI. Cheers! – SuRa Jul 16 '20 at 15:55
  • Does this website help you? sarata.com/manpages/lowriter.1.html – Raffles Jul 16 '20 at 17:44
  • @Raffles No. They gave the list of attributes but doesn't mention what we need to use to convert pdf to word. – SuRa Jul 17 '20 at 5:14
1

Did you try with soffice?

soffice --infilter="writer_pdf_import" --convert-to docx sample.pdf
1

I'm using LibreOffice for a long now but still can't understand it how does it work with different files.
I'm using the below command to convert PDF to WORD. You may try :

libreoffice --infilter="writer_pdf_import" --convert-to docx input.pdf

This is working perfectly.

2
  • Does not work for me. I got: Error: source file could not be loaded. I had put the full path but does not work – skonsoft Mar 3 at 15:20
  • try executing the command when you are in same directory with the input.pdf – rahim.nagori Mar 4 at 2:32
0

As per this post: Can I convert a PDF file to a Word File? - Ask LibreOffice

No, LibreOffice will not convert a PDF to a DOC (or ODT) or so.

If your pdf is having texts and not images you can open it with LibreOffice draw and then copy and paste and edit & save document as you need.

2
  • 3
    It will convert. The only problem is no one shared the exact code to convert. My first command is working but with some errors. The second command is working but not efficient. All I need is some expert help – SuRa Jul 16 '20 at 15:53
  • was the OP asking about MS Word or LO Write? – 24601 Aug 5 '20 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.