PDFs get re-routed to open in Writer instead!?!?

Hi,

I have debian jessie, newly installed with the latest libreoffice suite.

Back when I had fedora 21, libreoffice draw used to open the PDFs. However, on debian, I click on a PDF and the file is opened instead in libreoffice writer. The file however is not recognized as being a PDF so what is opened is the literal contents of the PDF file.

Even if I open libreoffice draw via command line (using sdraw program), it still re-directs the file to be opened in writer, how do I fix this?

Which version of LibreOffice do you have installed?

You might try upgrading to a more recent version to see if that corrects the issue. I’m using LibreOffice 5.2.0.4 on Windows 8.1 and confirmed that LibreOffice opens pdf files in Draw.

Is this not a Debian file manager rather than a LibO setting? On my Linux-Mint Mate system when I wish to change the program used to open the file, I open the file manager (CAJA in my case) and right click on the file in question. Then choose which program I wish to use to open the file and make this the new default.

Version: 5.2.7.2
Build ID: 1:5.2.7-1+deb9u11
uname -a Linux devuan 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linu

The same problems occuers here.
File manager, right click, open in Draw, opens in writer.
Draw, open file, pdf, switches to writer as well.

On other machines I had to issues with this.

IS there a workaround?

This is not an answer to the initial question. You should have added a comment (but it would not have “refreshed” the question to push it at head of question list) or asked a new question, citing this one in a link.

When you ritght-click on the file icon, what does the Open with… menu say? In which order are the target applications listed?

Definitive answer depends on your desktop manager. Which one are you using? GNOME? MATE? KDE Plasma? A lightweight one like Xfce or LXDE?

The problems isn’t what is showing up in the right click menu; it shows Draw. Draw automatically came up in the right click menu after I installed Libreoffice.
The problem is that, if I open a PDF with Draw, no matter what way, they open in Writer instead of Draw.

I use PCManFM 1.2.5 on Openbox.

Right click menu;
Firefox ESR
xpdf
LO Draw
Open with…

It opens in Writer in what way? does it look like the normal PDF contents, or is it shown as PDF codes? (in which case it could be an issue with system poppler maybe?)

It opens indeed as PDF codes in Draw.
In xpdf it opens normally, how the pdf was designed.

@japieapie: “indeed”? “in Draw”?

Normally LibreOffice is able to open PDFs both in Draw and in Writer, both looking as designed. However, if your LibreOffice instance has broken PDF import, it would not recognize the PDF, and then would treat the file as plain text, opening also in Writer, but showing PDF codes instead of the proper view. Thus I suspected that you have possibly some problem with poppler library on your system (which is used by LO to import PDFs); maybe some LibreOffice PDF-related package is missing.

Please excuse me that I don’t have all knowledge about it.

I installed poppler-utils, but the issue remains the same. I can’t find how to proceed.
Could you suggest what the next step could be?

I can’t find any solution how to fix this issue.
Could somebody maybe provide me a solution or direction where to look for?