I was recently very surprised to find out LO supports importing PDFs into apps other than Draw (see bug 141730). The reason is that when you open a PDF file in LO, regardless of which app you opened it with - it gets opened in LO Draw. Only if you scroll down the list of input format options and locate an app-specific PDF input filter, do you get the file imported into the app of your choice. So, in addition to the inconvenience of doing this, there's the fact that, like me, I'm sure many users are simply not aware of the existence of these input filters! It would make more sense, be more convenient, and expose this filters, if the PDF input filter used by default (or perhaps I should say selected by default on the list?) would depend on the app from which one is opening the file. Behavior when opening from a (non-LO) file manager is also interesting to consider but not in this bug, so I'm not making any suggestions about it.
Interesting. Didn't know either
Suppose it would be possible to establish a per module Document Service based filter detection (like the filterdetect.cxx used for CSV (various formats) into Writer or Calc [1]). The Document Service is linked to the active LO module the request comes in from (Draw, Impress, Writer) and would then use the associated PDF import filter rather than the default import filter into Draw. But that would be a lot of dev effort for what really is a corner case filter import use. LO's own file manager, or the integration to use os/DE file manager to select the document type/filter seems sufficient. =-ref-= [1] https://opengrok.libreoffice.org/xref/core/filter/source/textfilterdetect/filterdetect.cxx?r=ada07f30#33
All modules except Calc. Let's filter Writer or Impress when the PDF is opened from this module, otherwise Draw.
(In reply to V Stuart Foote from comment #2) As I'm not a developer, I can't speak to how much work this actually entails, but - there is justification for module-specific behavior of the file picker even regardless of this bug (although maybe I should open a separate issue about that). At any rate - how hard can it be to make the file picker wrapper code accept an optional mapping of file types to default open filters? > for what really is a corner case filter import use. On the contrary - it is arguably the main case for opening PDFs, since: * One rarely opens PDFs from the "non-specific module" (what you get when you start LO with no switches and no documents) * When opening a PDF using the DE, there is typically(/always) just a single LO option, which is opening in Draw. > file manager to select the document type/filter seems sufficient. It's insufficient, so much as that even relatively experienced users fail to realize this is at all possible. And with the desktop environment it's not made possible (at least - with many desktop environments; maybe with all of them).
(In reply to Heiko Tietze from comment #3) > All modules except Calc. Let's filter Writer or Impress when the PDF is > opened from this module, otherwise Draw. The interesting modules AFAIAC are Draw, Writer and Impress. The behavior you suggest seems fine.
Just a code pointer to those who are interested in: When I open a PDF document from the start centre, the pickup of the "draw_pdf_import" filter seems to be determined by: PDFDetector::detect in sdext/source/pdfimport/filterdet.cxx You can observe this by setting a breakpoint when you are running LibreOffice using "make debugrun" break sdext/source/pdfimport/filterdet.cxx:194 However, it is very strange that, when I manually choose "PDF - Portable Document Format (Writer)" from the file format list dropdown in the file open dialog, this code is never hit.
*** Bug 146412 has been marked as a duplicate of this bug. ***
(In reply to V Stuart Foote from comment #7) Quoting from the dupe bug: > Many users can not figure this out. I'd say _most_ users who might want to import PDFs don't figure this out. They probably check by opening their PDF in Writer, seeing that it's Draw that gets opened, and give up. > They resort to various less-then-ideal workarounds such as using online > converters and using MS Word to convert pdf to odt etc. See > https://ask.libreoffice.org/t/trying-to-convert-pdf-to-odt/45070/7 Indeed! > Please improve your UI. At the very minimum a PDF opened via the Writer should > open in Writer. This is my original ask here. If that's difficult for the reasons V Stuart Foote gave, another alternative would be an "import filter" which makes the user select the module using a dialog, i.e. "Open this file in..." dialog; or perhaps an extra option in the Open File dialog, made visible only for a generic PDF import filter. Also, marking this as a (usability) bug rather than a mere enhancement.
Dear Eyal Rozenberg, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
The situation hasn't changed with 26.2 nightlies.