Problem with pdf to odt conversion

I need to convert .pdf file to .odt or .docx. I use command line libreoffice --convert-to doc test.pdf --headless. It’s working but there’s problem with converted file. If I have 5 page .pdf after conversion there’s only one page .odt and text from each page is on the text from previous. Any idea what I’m doing wrong?

Minimise need for guessing, please!
Would you mind to post the exact command you used?
Use the ‘Code’ tool of the editor here, please.
Why did you write “to odt” in the subject, “.odt or .docx” in the first line of the question, but “doc” in the command?

I don’t think LibO is capable of a pdf-to-odt conversion. If you try to open a pdf with LibO a ‘Draw’ document will be created. The texts will be inserted into Text Boxes line by line.

If a pdf is convertible at all into text preserving the structure and the appearance as well, it should be done with an actual pdf editor.

If the files you want to convert don’t contain sensitive information then try here: http://www.zamzar.com/

For a full list of what zamzar can convert to look at the “Step 2” part of the screen and use the drop-down menu. All the conversions possible are not list in the “Popular Conversions Supported” information - hence use the drop-down.