Bug 150793 - Exporting a large .docx or .odt file to PDF removes all links
Summary: Exporting a large .docx or .odt file to PDF removes all links
Status: RESOLVED DUPLICATE of bug 142133
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: PDF-Export Hyperlink
  Show dependency treegraph
 
Reported: 2022-09-05 12:48 UTC by _mvs_
Modified: 2024-03-07 13:32 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
large file with lots of links (3.61 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-09-05 12:48 UTC, _mvs_
Details
large file with lots of links [editable] (3.61 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-09-05 14:41 UTC, _mvs_
Details
1 page DOCX from MSO (266.90 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-09-07 14:25 UTC, Timur
Details
1 page DOCX exported in 6.0 with bibisected commit (71.07 KB, application/pdf)
2022-09-08 07:59 UTC, Timur
Details
1 page DOCX exported in 6.0 before bibisected commit (71.35 KB, application/pdf)
2022-09-08 07:59 UTC, Timur
Details
Clean example file with links (29.31 KB, application/vnd.oasis.opendocument.text)
2022-09-08 10:12 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _mvs_ 2022-09-05 12:48:16 UTC
Created attachment 182224 [details]
large file with lots of links

I am exporting a .docx file to PDF and its links are not present in the exported file. I have tried converting it to .odt first and the issue persists.

This only happens to me with large files with lots of links such as the one attached, if I do this with file that only contain, say 10 links, the exported PDF file will have all of its links functional.

This happens to me in both 7.4.0.3 and 7.3.5.2 versions of LibreOffice.
Comment 1 Roman Kuznetsov 2022-09-05 14:21:28 UTC
I don't see any hyperlinks in your document. What links do you mean?
Comment 2 _mvs_ 2022-09-05 14:24:51 UTC
Hi again,

You can check, for instance, page 16, the paragraph with the Amanixer and DFA hyperlinks. If I click over them, I get the "press Ctrl+click to open etc." message, and if I do that, the file opens that link correctly, but not if I export it as PDF.
Comment 3 _mvs_ 2022-09-05 14:41:40 UTC
Created attachment 182227 [details]
large file with lots of links [editable]
Comment 4 _mvs_ 2022-09-05 14:42:34 UTC
I just added an editable version of the same file containing all the hyperlinks, in case that helps.
Comment 5 QA Administrators 2022-09-06 03:55:09 UTC Comment hidden (obsolete)
Comment 6 Timur 2022-09-07 13:47:52 UTC
Some rules of Bugzilla are to check existing bugs and attach minimal sample, 1 page not 16. But I reproduce so New.
Comment 7 _mvs_ 2022-09-07 14:03:33 UTC
I understand, but with very reduced documents I cannot reproduce it, that's why I attached the large file. Please accept my apologies.
Comment 8 Timur 2022-09-07 14:25:13 UTC
Created attachment 182285 [details]
1 page DOCX from MSO

No repro 5.4, repro 6.0 and 7.5+. Regression.

There was also a not relevant change from wrong to differently not good with source ccb38977541c304ff08ebe1a1b24c512ab670acf
that's the same as in bug 148567.
Comment 9 Timur 2022-09-07 14:41:48 UTC
6.0 commit 386f73847b6b9c404ec4be27942fcde129b85c12
Date:   Wed Mar 7 17:08:39 2018 +0100
    source 176356a3c802151967c26dc78f58244fcab9693a
    pre 80dafc57786b6e342468cea227e25fd17ac6dd10

author	Gabor Kelemen <kelemeng@ubuntu.com>	2018-02-28 00:34:00 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-03-07 13:21:06 +0100
tdf#91680 Reserve space in margin for comments only if there are comments

CC Gabor, please check.
Comment 10 Gabor Kelemen (allotropia) 2022-09-07 19:01:37 UTC
For me on Windows the links work in the exported PDF until 6.3 fine.

Seems to have been broken in 6.4 by:

https://git.libreoffice.org/core/+/576611895e51186d38ddefa10ed8d66075d9de37

author	Tünde Tóth <tundeth@gmail.com>	Tue Oct 08 13:58:44 2019 +0200
committer	László Németh <nemeth@numbertext.org>	Sat Oct 12 10:00:20 2019 +0200

tdf#127741 DOCX import: format hyperlink with Default character style

Adding CC to: Tünde Tóth
Comment 11 Timur 2022-09-08 07:59:21 UTC
Created attachment 182299 [details]
1 page DOCX exported in 6.0 with bibisected commit

Gabor, please test once more. Links look like they are there, but they are not proper. I may not be getting consistent results, as I already noted bibisecting in bug 148567 which is the same.

Here is PDF I exported in Linux in 6.0 with bibisected commit.
Comment 12 Timur 2022-09-08 07:59:57 UTC
Created attachment 182301 [details]
1 page DOCX exported in 6.0 before bibisected commit
Comment 13 Timur 2022-09-08 08:01:03 UTC
So in 6.0 link went from good to bad and in 6.4 to none.
Comment 14 Gabor Kelemen (allotropia) 2022-09-08 10:05:46 UTC
(In reply to Timur from comment #13)
> So in 6.0 link went from good to bad and in 6.4 to none.

Oh yes, thanks for the example files.
To trigger that behavior, one needs to change the Options - Writer - Print - Comments to "In margins".
Then the position of the hyperlinks is becoming incorrect, they move towards the bottom left corner by the size of the comment margin. 

Very interesting behavior, albeit a different one than what OP reported. 
I think that one is covered by bug 146575 and bug 148567 (my hunch is that this latter commit by Tünde just brought the docx import to the same badness where odt already was).
So it's okay to refocus this bug to the moving link position.
Comment 15 Gabor Kelemen (allotropia) 2022-09-08 10:12:23 UTC Comment hidden (obsolete)
Comment 16 Gabor Kelemen (allotropia) 2022-09-09 14:27:48 UTC
(In reply to Gabor Kelemen (allotropia) from comment #15)
> Created attachment 182306 [details]
> Clean example file with links
> 
> This clean example shows the moving link position behavior in bibisect-6.1
> when the Comments setting is "In margin".
> But looks to work correctly in master. Hm, perhaps this one was already
> fixed?

Indeed it is fixed since 6.4 by

https://git.libreoffice.org/core/+/65611a4772b6537658dbbc9392cdac31aef6c7a7

author	Michael Weghorn <m.weghorn@posteo.de>	Mon Dec 02 10:56:17 2019 +0100
committer	Michael Weghorn <m.weghorn@posteo.de>	Tue Dec 03 08:45:59 2019 +0100

tdf#47583 sw: Don't mix doc print settings into option dialog

So this seems to be a duplicate of the ones in See also.
Comment 17 Stéphane Guillou (stragu) 2024-03-07 13:32:05 UTC

*** This bug has been marked as a duplicate of bug 142133 ***