How to convert a PDF file to plain text

can I use writer convert a PDF file to plain text

Please clarify whether your PDF file has selectable text or is an image of text. The answer by ROSt52 assumes it’s an image.

The best LibO application to convert pdf-files is Draw,

If this is not matching your requirements you can use an OCR SW or PDF2Word.

In newer LO, if you can arrange it, files can be saved as PDF with embedded ODF (hybrid).
As suggested, LO then has Draw.
For general PDFs, best quality OCR software are FineReader or OmniPage on Windows, and there are some even free on Linux.