<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - PDF: Export to PDF of relative hyperlinks created by function HYPERLINK() not plausible"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=142707">142707</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>PDF: Export to PDF of relative hyperlinks created by function HYPERLINK() not plausible
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>7.1.2.2 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Calc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>scno@gmx.net
</td>
</tr></table>
<p>
<div>
<pre>Description:
Relative paths to a subdir are not exported correct to a pdf. There happens a
lot of unwanted and untested string conversion I think.
Steps to Reproduce:
Export relative path in PDF export dialog.
Create directory "subdir" on "d:\".
Use a working pdf as target.
Copy the pdf to "D:\subdir\"
Rename it to "file.pdf"
Create a calc document in "D:\".
Now we want a relative path to the pdf in the subdir.
Case A:
=HYPERLINK("subdir/file.pdf")
Case B:
=HYPERLINK("./subdir/file.pdf")
Case C:
=HYPERLINK("d:/subdir/file.pdf")
Case D:
=HYPERLINK("file:///d:/subdir/file.pdf")
Actual Results:
Case A:
- working hyperlink in ODS
* path is relative
* leading to "subdir/file.pdf"
- not working hyperlink in PDF
* path is relative
* leading to "file:///D:/./subdir%2Ffile.pdf"
* a "./" is inserted
Case B:
- working hyperlink in ODS
* path is relative
* leading to "./subdir/file.pdf"
- not working hyperlink in PDF
* path is relative
* leading to "file:///D:/./.%2Fsubdir%2Ffile.pdf"
* an additional "./" is inserted
Case C:
- working hyperlink in ODS
* path is absolute
* leading to "d:/subdir/file.pdf"
- not working hyperlink in PDF
* path is relative
* leading to "file:///D:/./d:%2Fsubdir%2Ffile.pdf"
* a "D:/./" is inserted
* I moved subdir and the pdf to "T:\"
* now leading to "file:///T:/./d:%2Fsubdir%2Ffile.pdf"
Case D:
- working hyperlink in ODS
* path is absolute
* leading to "file:///d:/subdir/file.pdf"
- working hyperlink in PDF
* path is absolute
* leading to "file:///d:/subdir/file.pdf"
Expected Results:
Case A and B should in any case lead to working relative path.
Case C and D should in any case lead to working absolute path.
Reproducible: Always
User Profile Reset: No
Additional Info:
I used a workaround by computing the actual path.
=HYPERLINK(CONCATENATE(REGEX(CELL("FILENAME");"file:///.+/");"subdir/file.pdf"))
So I get a relative path to the pdf in both the ODS and in the exported PDF
file.
One small flaw in my workaround is because there is no celltext given in this
example, it does change the linkaddress in the exported PDF, if I copy it to a
new location, but not the celltext.
A bigger problem for Mac users may be, that it does not work on a Mac, but I
don't have a Mac for daily use to play around with.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>