Bug 148567 - Hyperlinks in Google documents exported to docx converted to PDF lose their clickability
Summary: Hyperlinks in Google documents exported to docx converted to PDF lose their c...
Status: RESOLVED DUPLICATE of bug 142133
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: PDF-Export Hyperlink
  Show dependency treegraph
 
Reported: 2022-04-13 12:46 UTC by joseph.wong
Modified: 2024-03-07 13:37 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample test document (6.09 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-04-13 12:47 UTC, joseph.wong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description joseph.wong 2022-04-13 12:46:58 UTC
Description:
If you put hyperlinks in a google document, export those to docx, and then convert the docx document to PDF with libreoffice, then the hyperlinks can no longer be clicked from the PDF.  If you open the docx file, they *can* be clicked.

Steps to Reproduce:
1. Create a google document with a hyperlink (example: https://docs.google.com/document/d/1nWxp413Jb3q7B7GtwUZrAQw1GmzTTZ2hkNewxk8eqEQ/edit?usp=sharing)
2. Download that document as a docx file
3. use soffice --convert-to pdf to convert the file to pdf

Actual Results:
The generated PDF's links cannot be clicked

Expected Results:
The generated PDF's links can be clicked


Reproducible: Always


User Profile Reset: No



Additional Info:
The generated PDF's links should be clickable.
Comment 1 joseph.wong 2022-04-13 12:47:22 UTC
Created attachment 179525 [details]
sample test document
Comment 2 Rainer Bielefeld Retired 2022-04-13 17:34:55 UTC
REPRODUCIBLE with reporter's sample document Installation of Version: 7.3.0.3 (x64) Build ID a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win | Locale: de-DE (de_DE); UI: de-DE | Calc: threaded | ElementaryTheme | My normal User Profile:

0. Download document from link as .docx
1. Open in LibO
2. Menu ˋFile → Export as → PDF → 600 EPI, jpeg-compression → [ok]ˊ
3. Open exported PDF in AR, click on "CBC"
   » Expected: Linked page opens in Browser (as it does in .docx)
    Actual: Nothing, Mousepointer over string even does not change to 
            "Fingerhand"                                                  😥

Additional info
a) After having saved as .odt in (0) link in (3) will work.
b) Still works in PDF export  after having .odt form (a) as .docx
c) having closed .docx from (b) and reopened, then again exported to .pdf,
   "CBC" hyperlink will no longer work in PDF
   (what ever that might mean)
d) No obvious DUPs found with query <https://bugs.documentfoundation.org/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=DUPs148567&sharer_id=19321>
d) I haven't a clue what "soffice --convert-to pdf" might be
e) currently WIN is only known OS, although I am pretty sure that the problem
   affects all OS
Comment 3 joseph.wong 2022-04-13 18:13:58 UTC
Regarding the convert-to pdf step, I was using a headless version of libreoffice to convert a file to pdf via the command line.  Here's a blog post that talks about that: 

https://opensourcemusings.com/another-way-to-convert-files-at-the-command-line-with-libreoffice
Comment 4 Timur 2022-05-24 15:05:21 UTC
(In reply to joseph.wong from comment #0)
> Actual Results:
> The generated PDF's links cannot be clicked

It depends on PDF viewer. 
In Linux, they cannot in almost all I tried (Evince, xpdf, Master PDF, Acro), except in WPS PDF.
In Windows, they cannot in Adobe or Master PDF, possible in old Xchange-viewer and  new Xchange-editor.

But reports is probably because previously up to 6.3 same program like Evince or Acrobat could open link.
Comment 5 Timur 2022-05-25 10:53:16 UTC
I bibisected this but I'm not convinced this is a bug to resolve. 




author	Tünde Tóth <tundeth@gmail.com>	2019-10-08 
committer	László Németh <nemeth@numbertext.org>	2019-10-12 
commit 576611895e51186d38ddefa10ed8d66075d9de37 (patch)

tdf#127741 DOCX import: format hyperlink with Default character style
according to correct hyperlink handling, avoiding various editing
and layout problems; "sticky" and not easily removable character style
around the hyperlink and multiple blue hyperlink colors.

Set also Visited/Unvisited link character styles when the style of
the hyperlink is not the requested "Internet Link".
Comment 6 Stéphane Guillou (stragu) 2022-11-28 09:35:16 UTC
Reproduced in master build from today, using link and steps in Description, export with default PDF settings, opened in GNOME Document Viewer 3.36.10, Firefox 107.0, Okular 1.9.3.

In Chromium 107.0.5304.121, only the first Google link works, the CBC one doesn't.

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 1fd42472e2b1a2169d56e62ef11aa7ee1f7815e7
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Tünde, what do you think?
Comment 7 Stéphane Guillou (stragu) 2024-03-07 13:30:52 UTC

*** This bug has been marked as a duplicate of bug 142133 ***
Comment 8 Stéphane Guillou (stragu) 2024-03-07 13:37:10 UTC
(In reply to Stéphane Guillou (stragu) from comment #6)
> In Chromium 107.0.5304.121, only the first Google link works, the CBC one
> doesn't.
Correction: this is only because Chromium's PDF viewer recognises a URL syntax. This can be tested with a plain text www.something.com that isn't even hyperlinked in the original file: it will still be clickable in the PDF export when opened in Chromium. Removing "in most viewers" from the summary.