Download it now!
Bug 108748 - PDF inserted into document as linked disappears after saving and reloading
Summary: PDF inserted into document as linked disappears after saving and reloading
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Files-Linked
  Show dependency treegraph
 
Reported: 2017-06-24 22:39 UTC by bartolom
Modified: 2018-06-16 17:40 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 bartolom 2017-06-24 22:39:53 UTC
Description:
Glossary: In this description I refer to a "PDF-Image": For me this is a graphic inserted into my Writer document that is a PDF, like a diagram.

LibreOffice 5.4 has a new PDF-Image embedding functionality like described here:
https://vmiklos.hu/blog/pdfium.html and https://vmiklos.hu/blog/pdf-image-rountrip.html and it works very well. (pdfium)

But when I decide to "link" a PDF-Image instead of "embedd" it then the PDF-Image is not loaded correctly when reopening a Writer file

I "link" it because these will be tables generated with Apache-Fop and diagrams created in Adobe-Illustrator. I'm aware of the benefits/drawbacks for the end-user like me when choosing "link". I prefer linking because the PDF created by Apache-FOP will change. Later I will do a PDF Export from LibreOffice

Steps to Reproduce:
1. place a PDF-Image by selecting Menu => Insert => Graphics
2. select a PDF and check the "Link" checkbox in the File-Select-Dialog
3. safe the file as test.odt
4. close Libreoffice
5. open Libreoffice and open test.odt

Actual Results:  
The area where I expect the image shows only a frame and the "file:///...." URL as red text which is blinking and is replaced with a text "Read Error" approximatly every second.

Expected Results:
I expect to see the PDF-Image in the same way that I have created it before I have closed Libreoffice.

I made the same test with a JPG-Image instead of a PDF-Image and there this works as expected


Reproducible: Always

User Profile Reset: No

Additional Info:
The only special settings about my Libreoffice installations are that I use a dark background and have Zotero installed as well


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Comment 1 bartolom 2017-06-24 23:05:39 UTC
I'm now not so sure any more if this is caused by the new LibreOffice 5.4. pdfium functionality.

It seems to behave similar in my LibreOffice 5.3.

But I was surprised that I acutually still have a 5.3. version because the 5.4.Beta2 web page http://www.libreoffice.org/download/pre-releases/ says: "RC builds are in release configuration and will replace your existing LibreOffice installation!"

To be sure that it affects 5.4. as well

I rebooted my computer

I explicitly clicked on the LibreOffice 5.4. icon on my desktop, checked the "About Dialog" to be sure that I'm in 5.4.0 and created the test.odt file again in the same way, and the behaviour is the same as reported in the description of this bug.
Comment 2 Buovjaga 2017-06-28 17:07:03 UTC
Repro.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: f808c50c6eece87d515df3b84b1c774395b5d9bc
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on June 26th 2017
Comment 3 sam tygier 2017-08-16 20:27:24 UTC
Bug 104998 ?
Comment 4 bartolom 2017-08-17 08:22:58 UTC
Bug 104998 looks very related. 

The main difference is that I use "link" right away
Comment 5 Xisco Faulí 2017-10-26 14:58:48 UTC
Gerrit patch: https://gerrit.libreoffice.org/#/c/43906/
Comment 6 Xisco Faulí 2017-10-26 15:31:21 UTC
Regression introduced by 71b2dc0de9514d9972211f03641f64b7ed9ed8f3, which is different as in bug 104998. Probably not the same bug....
Comment 7 Commit Notification 2017-11-06 14:50:45 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3a88795c1211c62277dc646e61c2ba8306febe37

tdf#108748 generate PDF preview on SwapIn

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Xisco Faulí 2017-12-07 08:44:09 UTC
A polite ping to Jan-Marek Glogowski: is this bug fixed? if so, could you
please close it as RESOLVED FIXED ? Thanks
Comment 9 Xisco Faulí 2018-01-08 10:38:52 UTC
Verified in

Version: 6.1.0.0.alpha0+
Build ID: 0ef0740298b45379bbf8d00d50beffee7a2f812a
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded