Description: I am using bash command "soffice -convert-to pdf" to convert my Docs file to pdf. I put a picture in a file and adding hyperlink to the picture (the picture is clickable). After converting the file to pdf using soffice, the hyperlinks on the pictures are broken. The picture is not clickable anymore. Steps to Reproduce: 1. Create a Word file with a picture inside it. (name a file my_file.docx) 2. Add hyper link to the picture. 3. Run: soffice --headless env:UserInstallation=file:///tmp/convertfile/.config --convert-to pdf ./my_file.docx Actual Results: If you open the pdf file, the picture is not clickable. The hyperlink is broken. Expected Results: The picture in the pdf file should be clickable. (It works if I save the file as PDF from the Microsoft Word application on my computer). Reproducible: Always User Profile Reset: No Additional Info: Tried to reproduce on Word and Excel files. It happens with Excel files as well as Docs. It happens in mac-os and linux (amd64).
Created attachment 192084 [details] Docs file with picture with a link
Created attachment 192085 [details] Docs file that I saved using save as pdf - link works
Created attachment 192086 [details] Docs file converted to pdf using soffice
Docs file converted to pdf using soffice - the link is broken.
Test if some link options to export with soffice can help. https://help.libreoffice.org/latest/en-US/text/shared/guide/pdf_params.html?&DbPAR=SHARED&System=UNIX#:~:text=specifies%20that%20the%20bookmarks%20contained%20in%20the%20source%20libreoffice%20file%20should%20be%20exported%20to%20the%20pdf%20file%20as%20named%20destination.
Hi, I tried: soffice --headless env:UserInstallation=file:///tmp/convertfile/.config --convert-to pdf:draw_pdf_Export:ExportBookmarksToPDFDestination=true ./Link.docx and I tried all the flags: ExportBookmarksToPDFDestination ExportLinksRelativeFsys ConvertOOoTargetToPDFTarget PDFViewSelection But the issue is still happening. The picture is not clickable in the pdf.
Hi, any updates on this bug?
Thanks for the report, Darya. Please do not set you own report as "new", as another contributor needs to confirm the issue. Note that the DOCX sample you attached does _not_ have a hyperlink on the image. I had to add it to test. I tested with: 1. Open you sample DOCX attachment 192084 [details] 2. right-click on image > Properties > Hyperlink > filled URL field with https://whatcanidoforlibreoffice.org > OK 3. Export to PDF, both with command line and GUI. The link works. File opened with Evince and Firefox. Tested with: Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 9574a62add8e4901405e12117e75c86c2d2c2f21 CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: CL threaded Can you please: - test again, making sure the image does have a hyperlink in LibreOffice - open the file with different PDF viewers - give us more precise steps / a new file sample if you can still reproduce
Hi, I re-downloaded the "Docs file with picture with a link" file, and the picture is clickable. When I open it with Microsoft Docs on mac and press the link, the https://www.paloaltonetworks.com/ link is opened. After converting the file using libreoffice tool, the picture in the pdf file is not clickable.
Right, I can see the link in Google Docs, and downloading at PDF keeps the link. In online Office 365, the link is shown next to the image, and not exported to PDF either. In LibreOffice, I tested as far as 5.0 and I could never see a link on the image in the DOCX attachment. Just to clarify: - when you say "the picture is clickable", you mean in MS Office desktop, right? When you open the DOCX in LibreOffice, the picture is not clickable, and the URL field is empty? In which case it would be a DOCX filter issue. - your second attachment ("Docs file that I saved using save as pdf - link works") was exported with MS Office?
Answers: 1. when you say "the picture is clickable", you mean in MS Office desktop, right? When you open the DOCX in LibreOffice, the picture is not clickable, and the URL field is empty? In which case it would be a DOCX filter issue. Yes, I open the file using MS Office Docx on my mac and the picture is clickable there. I did not try to open the file using libre office. - your second attachment ("Docs file that I saved using save as pdf - link works") was exported with MS Office? Yes, I used MS Office Docx on my mac and did: File->Save As -> PDF. The links on the saved pdf file worked.
Thanks for clarifying. So the issue is that a hyperlinked image is not imported properly. Same in OOo 3.3 -> inherited. How was the file created?
I created a file using Google Docs.
I tested with my own file created in Google Docs, one picture hyperlinked. Exported DOCX has in word/document.xml: <w:hyperlink r:id="rId6"> <w:r w:rsidDel="00000000" w:rsidR="00000000" w:rsidRPr="00000000"> <w:rPr><w:color w:val="1155cc"/><w:u w:val="single"/></w:rPr> <w:drawing> <wp:inline distB="114300" distT="114300" distL="114300" distR="114300"> <wp:extent cx="5731200" cy="3835400"/> <wp:effectExtent b="0" l="0" r="0" t="0"/> <wp:docPr id="1" name="image1.jpg"/> <a:graphic> <a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic><pic:nvPicPr><pic:cNvPr id="0" name="image1.jpg"/><pic:cNvPicPr preferRelativeResize="0"/></pic:nvPicPr><pic:blipFill><a:blip r:embed="rId7"/><a:srcRect b="0" l="0" r="0" t="0"/><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="5731200" cy="3835400"/></a:xfrm><a:prstGeom prst="rect"/><a:ln/></pic:spPr></pic:pic></a:graphicData> </a:graphic> </wp:inline> </w:drawing> </w:r> </w:hyperlink> The target for the hyperlink is in word/_rels/document.xml.rels: <Relationship Id="rId6" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://bugs.documentfoundation.org/show_bug.cgi?id=159308" TargetMode="External"/> (Note that an export of the same Google Docs file to ODT also loses the hyperlink)