Download it now!
Bug 33596 - [TASK] Extract PDF Export and Hyperlink handling bugs from original export
Summary: [TASK] Extract PDF Export and Hyperlink handling bugs from original export
Status: RESOLVED DUPLICATE of bug 70833
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.3.0 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2011-01-27 08:16 UTC by theWebalyst
Modified: 2020-12-12 16:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Writer file containing hyperlinks, used to File/Export as PDF (201.04 KB, application/vnd.oasis.opendocument.text)
2011-01-27 08:16 UTC, theWebalyst
Ahah, here is the PDF generated by the Writer file attached to the initial report- you will see the garbage local document prefixed on the GTH link in this (249.08 KB, application/pdf)
2011-01-27 08:19 UTC, theWebalyst

Note You need to log in before you can comment on or make changes to this bug.
Description theWebalyst 2011-01-27 08:16:17 UTC
Created attachment 42596 [details]
Writer file containing hyperlinks, used to File/Export as PDF

I had some fun getting my OpenOffice Writer document to output hyperlinks adequately in PDF export, and have been using the newly release LibreOffice Writer to update the same document today.

I hit numerous bugs in the Edit/Insert hyperlink UI, and some very strange behaviours in the PDF export output.

I think this whole area needs some regression tests writing and possibly marking for rewrite as I encountered such a variety of buggy behaviour while working in this narrow area.

Some examples from memory:
Edit Hyperlink not always accessible - I have existing hyperlinks embedded in the OO written document some of which can be edited and some of which can't and have to be deleted and re-created from scratch. I don't think this is an OO compat. issue, its a matter of where these hyperlinks are in the document. I observed various differences so I'm going to define these two kinds of link:

Hyperlink Definitions (I apologise for not knowing very well how to describe this. Someone who understands Writer and its objects better can tag this with better terms).
My hyperlinks appear in two places. 
   1 General Text Hyperlink (GTH) - In general text. I can right click the hyperlink and on the context menu I see "Edit Hyperlink"
   2 Enclosed Hyperling (EH) - e.g. text within an elipse, where I double click the elipse to edit the text. While in text edit mode, if I right click the hyperlink I have text format and style commands, but Edit Hyperlink is missing.

I was able to edit the hyperlinks to change the URLs for both GTH and EH. However, when I File/Export as PDF (accepting default options), the EH is generated correctly (e.g. but the GTH hyperlink has a load of garbage prepended to the URL as in "file:///thefulllocalpathtothegeneratedpdffile.pdf" which is utter nonsense. I have the correct settings in the Edit/Insert Hyperlink dialog in both cases, but for some reason the export treats GTH hyperlinks and EH hyperlinks differently.

Other problems I had were numerous while trying to get the insert/editing interfaces to create hyperlinks as I wanted:
- Selecting an EH and choosing Edit/Insert Hyperlink did not replace the selected hyperlink. I could find no way to edit an EH link and always had to delete and re-create, and re-apply necessary formatting
- Search and replace did not find the URLs of hyperlinks, so I could not use that to avoid having to edit every link manually
- Editing GTH (right-click, Edit Hyperlink) to access the current link settings and change them: I chose the "Target in document button" and the UI then tried unsuccessfully to access the document pointed by the hyperlink URL, and reported an error. Ok so far. However, there was no way to get out of this once activated, and from this point on the "accessing document" dialog and error message popped up repeatedly, even after closing the UI and going on to work on other hyperlinks. I only cleared it by restarting Writer.
- on most occasions when I tried to backtrack using undo, this failed to restore the document to the state prior to the change I was trying to undo.

In short, I could not find a way to generate a GTH in and exported PDF, and encountered many apparent bugs (or UI difficulties - search and replace would be nice!) in trying to edit a document that was ok when I started.

My solution for now is to only use the EH links for exporting to PDF. This  is ok for this one document, but not in a more general case where GTH links will be the norm.

I have attached a sample document:
- .odt file containing example Hyperlinks (GTH and EH)

On page 1 you will find examples of both kind of link:

EH Example: In the elipse, text displayed as "" has URL (This is output correctly in PDF)

GTH Example: Above the text "Notes" - bottom left - the link which displays as "" has URL in the .odt file, but is prefixed with a local filesystem URL when exported to PDF. 

I would have attached the generated PDF but seem only able to provide one attachment here. Email me if you can't replicate.

I'm on Windows 7 64bit.

Mark (in London)
Comment 1 theWebalyst 2011-01-27 08:19:22 UTC
Created attachment 42597 [details]
Ahah, here is the PDF generated by the Writer file attached to the initial report- you will see the garbage local document prefixed on the GTH link in this
Comment 2 Rainer Bielefeld Retired 2011-01-27 09:58:27 UTC
Your report contains several useful hints concerning LibO bugs, but it's much to "bulky" to be handled here. May I ask you to read <> carefully and to respect "only 1 bug in each Bug Report?

It would be great if you then could extract further problems in the same way as I did for one of the problems in 
Bug 33605 - Complex Hyperlinks broken in PDF export
And ad me to CC for each of those new reports

Please contribute information concerning your OS!
Comment 3 Rainer Bielefeld Retired 2011-06-26 23:15:46 UTC
No additional slave reports have been filed, so we can close this one INVALID - I will not try to find more bugs from the attachments
Comment 4 V Stuart Foote 2020-12-12 16:47:38 UTC

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