Ask Your Question
1

How do I get LibreOffice draw to retain hyperlinks when I open a PDF file ?

asked 2020-10-22 22:24:20 +0100

ColinR gravatar image

updated 2020-10-23 19:50:51 +0100

ebot gravatar image

I have been struggling with a problem for the last year or two, namely, how can I open a PDF file using Draw without the hyperlinks being removed ?

I am often needing to add additional links to PDF letters that I receive via email. The problem is that upon loading into Draw, the existing links vanish ! I end up having to open up the original in PDF Viewer to copy the hyperlinks and then create them from scratch in Draw.

Is Draw actually capable of loading in a PDF file and retaining the hyperlinks ? If so, can someone tell me what setting are needed in Draw so that it retains links as a PDF is opened ?

Many thanks.

ColinR

EDIT_ebot 20201023-19.50-MEZ taken from answer, answer deleted.

Thank you for your response. I did take a look at the info, but it didn't resolve the issue. It did lead to some information about hybrid PDF's though.

If you create a basic Writer document with a single link in it, e.g. www.bbc.co.uk and save it as a PDF file, double clicking on the PDF file opens the file in PDF Viewer and clicking on the BBC link will take you to the website.

If I open the PDF file in Occular, once again, if I click on the link it will take you to the BBC website.

If I open the PDF file in Draw, however, the link is no longer there - it has been removed during the file reading process.

This seems like a shortcoming of Draw. Why can't it handle loading links ?

Interestingly, if I export the file containing the BBC link as a hybrid PDF, attempting to open it in Draw results in it being opened in Writer. The problem is that the file is twice the size of it's non hybrid counterpart.

Since creating a hybrid version results in the file opening in Writer every time, it looks like its no longer possible to use Draw functionality to add graphics, shapes or whatever once it has been converted to a hybrid PDF.

I would be interested to hear any further thoughts anyone might have, or if there are plans afoot for Draw to be able to cope with retaining hyperlinks.

edit retag flag offensive close merge delete

Comments

Please do not post an answer if it is not a solution to your initial question. Thank you.

ebot gravatar imageebot ( 2020-10-23 19:51:20 +0100 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2020-10-23 14:20:38 +0100

ebot gravatar image

updated 2020-10-23 19:37:07 +0100

...PDF letters that I receive via email.

The processing of foreign PDF files in Draw may be limited, see:

https://wiki.documentfoundation.org/F...

EDIT_ebot 20201023-19.36-MEZ

This could be provided by the "Security" tab in the PDF options. I have not tested it myself.

image description

edit flag offensive delete link more

Comments

Dear ebot,

I went back to look at the web page you posted. It states the following :-

Open and edit PDF files created in LibreOffice The file "Charcter Styles in Writer V6-4.odt" is used here as an example. This file can be downloaded here. This file was created in LibreOffice Writer. Export the file "Charcter Styles in Writer V6-4.odt" to PDF. Select File ▸ Export as ▸ Export as PDF... from the menu. In the "PDF Options" dialog box, in the "General|General" tab, set the corresponding check marks. An exported PDF file can then be edited in Draw or better yet in Writer. See also: Hybrid PDF file

============================================================== What does Author mean by "Set the corresponding check marks" ?

If he means export the file as a hybrid PDF by clicking the "Hybrid PDF" checkbox, he should state that. Unfortunately he gives no clue that this is what the user ...(more)

ColinR gravatar imageColinR ( 2020-10-23 17:48:45 +0100 )edit

"See also: Hybrid PDF file" at the bottom.

If you click on this link, it will be clear that you should check the box "Hybrid PDF file" (or Embed OpenDocument file).

The textual definition can be different depending on the LibreOffice version. Independently of this, you can make other selections, but these are not further discussed there.

But thanks for your hint, which should be included.

ebot gravatar imageebot ( 2020-10-23 18:26:43 +0100 )edit

PS: If you are interested in accurate documentation, we would be happy to assist you in editing the documentation or the wiki pages. Thanks a lot.

https://whatcanidoforlibreoffice.org/...

ebot gravatar imageebot ( 2020-10-23 18:30:40 +0100 )edit

I can see that exporting as a hybrid PDF could have an advantage. Rather than creating a .docx file as well as a .pdf file, the user could just create a hybrid PDF and edit it in Writer. My only concern is that, if I email the file to someone, that they could readily edit it.

Is there a way to save it so that the hybrid pdf is only editable by myself ?

ColinR gravatar imageColinR ( 2020-10-23 18:46:33 +0100 )edit

See my edited answer.

ebot gravatar imageebot ( 2020-10-23 19:35:46 +0100 )edit

My tip:


Rather than creating a .docx file ...

Basically:

Always create and save your files in LibreOffice and save them in ODF format (ODT, ODS, etc.). Always keep these files as their source. If you need other formats for distribution to partners, you can open an ODF file and save and distribute another format with ″ Save as… ″.

This way, you always have working files available in your system environment.

See: https://wiki.documentfoundation.org/F...

ebot gravatar imageebot ( 2020-10-23 19:39:28 +0100 )edit

If my answer solved your problem, please click on the check mark in the grey circle Bildbeschreibung on the left side of the answer to color it green Bildbeschreibung. This indicates to the community that the question was answered correctly.

ebot gravatar imageebot ( 2020-10-23 19:54:14 +0100 )edit

Thank you. I found the Security tab during the export operation and set a permissionpassword. That permits it to be opened without a password, but if the recipient attempts to open the file in Draw, it requests a password, thereby preventing them from editing it.

Thank you for the Tip. Opening a PDF file in Draw, adding the required links and then saving it as an .odg file works perfectly. I can open it at any time to add more hyperlinks and the existing hyperlinks remain intact. When I need to distribute it via email it's easy to export it as a non hybrid PDF, which keeps the file size economical.

ColinR gravatar imageColinR ( 2020-10-23 21:36:27 +0100 )edit

It is the TIP in this response that provides the required solution.

ColinR gravatar imageColinR ( 2020-10-23 21:59:52 +0100 )edit
0

answered 2020-10-23 21:56:44 +0100

ColinR gravatar image

updated 2020-10-23 21:57:23 +0100

Once a PDF file has been read into Draw and hyperlinks added to it, save it with the default format ( .odg ) - it can then be edited in Draw at any time to add more hyperlinks whilst maintaining existing hyperlinks.

Export as a non hybrid PDF when distributing via email, which keeps the size compact and prevents recipient editing it.

edit flag offensive delete link more
0

answered 2020-10-23 20:18:51 +0100

ajlittoz gravatar image

The edit of the question gives a better understanding of your workflow.

Your source document apparently is an .odt one made with Writer. This is the most versatile and user-friendly way of creating it and maintaining/editing it. It is then exported as a PDF for distribution, preventing recipients from altering it (this is the purpose of PDF among others).

Then you open the PDG with Draw. Draw is not a PDF editor. It is a graphics application. It decodes the page description language (the PDF encoding) to place shapes on the screen. I remind you that PDF removes a lot of information from the source document to keep only the position of "objects" in a page. Sometimes, special attributes are also transferred into the PDF because the standard requires so, e.g. hyperlinks. Because PDF describes a page graphically, it is perfectly normal that a PDF document opens in Draw

Draw retrieves the graphic "objects" without special attributes. Perhaps, it should. But my experiment shows that while you can attach hyperlinks to shapes, you can't use them. So, it's almost pointless in the present state to play with hyperlinks in Draw.

I wrote above that a lot of information is lost in the transformation to PDF. In particular, the notion of paragraph no longer exists. With regard to text, you get text boxes containing identically formatted characters for at most a line (several text boxes in a line if there are variations in the text like font face, bols, italic, color, font size, …). What was previously a paragraph is now a collection of text boxes.

Writer, were it able to open a PDF, would be at a complete loss because it could not reconstitute paragraphs nor guess what styles to apply.

This is not formaaly an answer but an explanation for what you experience.

edit flag offensive delete link more

Comments

Thank you for your response. It's pretty close to what I'm experiencing.

Basically I'm wanting to take a PDF file received by email, that may or may already contain hyperlinks with a view to adding more hyperlinks.

I now accept that Draw will NOT preserve the hyperlinks as I open the PDF, however, it is no great inconvenience to open the the PDF file in PDF Viewer to copy link addresses to paste them into Draw in their rightful place.

Whilst I didn't mind doing that once, it was becoming annoying having to do it each time because Draw can't read the hyperlinks if I only saved the file by exporting it as a PDF.

The solution is to just save the file as .odg . It can then be opened at any time to add new links and the existing links are preserved as the ...(more)

ColinR gravatar imageColinR ( 2020-10-23 21:51:26 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-10-22 22:24:20 +0100

Seen: 60 times

Last updated: Oct 23