Bug 120240 - Problem creating hyperlink to pdf by drag and drop (it only creates an image of the pdf's first page)
Summary: Problem creating hyperlink to pdf by drag and drop (it only creates an image ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Hyperlink
  Show dependency treegraph
 
Reported: 2018-10-01 14:01 UTC by Kaue
Modified: 2023-05-26 18:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kaue 2018-10-01 14:01:48 UTC
Description:
Problem creating hyperlink to pdf by drag and drop (it only creates an image of the pdf's first page).

If I do it with a .txt or .odt file it works fine. 
If I do it by clicking on "menu:Insert>Hyperlink...", than pointing the pdf file, it works fine.

Steps to Reproduce:
1-Open the file explorer and locate the PDF file in question. 
2-Make both windows, Writer and explorer visible. 
3-Drag the file icon to the Writer document holding the Ctrl and Shift key before dropping, than release mouse button.



Actual Results:
An image of the pdf's first page is created in the Writer document.

Expected Results:
Create a link to the pdf.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
A fellow at https://ask.libreoffice.org/en/question/167214/problem-creating-hyperlink-to-pdf-by-drag-and-drop/?comment=167236#post-id-167236 pointed me to report it as a bug.
Comment 1 Mike Kaganski 2018-10-02 18:09:30 UTC
Reproducible using Version: 6.1.2.1 (x64)
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 12; OS: Windows 10.0; UI render: default; 
Locale: ru-RU (ru_RU); Calc: group threaded

Holding Shift+Ctrl while dragging a file from Windows Explorer to Writer's text area turns the pointer to an icon indicating creation of a shortcut; when the file is, e.g., ODF or XLSX, the result is a text link pointing to the dragged file; but when the file is PDF, the result is as if no modifier button is used (inserted as image of first page, no link).

This is inconsistent behavior -> bug.
Comment 2 Mike Kaganski 2018-10-02 18:24:12 UTC
Relevant reference to help describing intended behavior: https://help.libreoffice.org/latest/en-US/text/shared/guide/dragdrop.html
Comment 3 Xisco Faulí 2018-10-17 11:03:31 UTC
I think this is not a bug.
PDF files can be inserted as images, thus, if we drag&drop a PDF file, it's inserted as an image, following the same behaviour as if we drag&drop an image.
Same for Ctrl and Shift keys, they will be inserted as linked images instead of embedded ones. PDF just follow the same logic.

IMHO -> NOTABUG
Comment 4 Mike Kaganski 2018-10-17 11:21:43 UTC
(In reply to Xisco Faulí from comment #3)

Well - yes, this appears to work as you explained (the link is indeed created).

Still - this is a matter of least surprise. While it's logical for images, I don't think it's what most users expect when dealing with PDFs. Being multi-page by nature, it's more likely that users would create links to open an external file than that they would try to create a linked "image" from a PDF.

I'd suggest this to become an implementation defect, or an enhancement.
Comment 5 Xisco Faulí 2018-10-17 11:59:01 UTC
so, just for the record, this behaviour changed in 5.3 after https://wiki.documentfoundation.org/ReleaseNotes/5.3#Improvements_in_the_PDF_filter

@Miklos, Could you please comment here?
Comment 6 Miklos Vajna 2018-10-17 12:11:41 UTC
Hrm, so this drag&drop behavior is intended to differ for image types and document types, and PDF is considered an image, not a document (since 5.3) -- is this correct?

What do we do for other multi-page vector formats, like SVG?
Comment 7 Timur 2018-10-25 08:48:18 UTC
Any image or PDF that is inserted via Insert-Image has only 1st page shown. 
That also caused Bug 93067 and Bug 120083.
Looks like we may remove "hyperlink" from the title.
Comment 8 Kaue 2018-10-26 02:50:38 UTC
(In reply to Timur from comment #7)
> Any image or PDF that is inserted via Insert-Image has only 1st page shown. 
> That also caused Bug 93067 and Bug 120083.
> Looks like we may remove "hyperlink" from the title.

But this bug here proposes to make the "create hyperlink" behavior the default when using drag and drop, as happens, for example, with the odt format. In defense of this proposal, I shall argue:

-Argument 1: The general user usually treats pdf and odt files in a similar way, as multi-page text documents. So, the drag and drop behavior should be the same for both formats.
-Argument 2: The general user usually treats pdf and odt files as multi-page text documents. When Drag and dropping (plus pressing Ctrl and Sift) a multi-page text document into the odt text file, one would, most commonly, do that in order to create a hyperlink to the given document, and not to create a non-editable image of it's first page.
-Argument 3: The Drag and Drop without any buttons pressed already creates an image of the pdf's first page, so it doesn't make sense that the "Drag and drop + Ctrl + Shift" (which is widely known as the "create hyperlink" function) do the same thing.
Comment 9 QA Administrators 2019-10-27 03:37:27 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2021-10-27 03:44:18 UTC
Dear Kaue,

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