tag:support.markedapp.com,2011-09-11:/discussions/questions/6447-relative-links-to-files-with-exportMarked: Discussion 2014-08-14T14:04:00Ztag:support.markedapp.com,2011-09-11:Comment/341390232014-08-14T09:37:30Z2014-08-14T09:37:31ZRelative Links to Files with Export<div><p>Hi Brett,</p>
<p>first of all, great app!</p>
<p>Second:<br>
I need to write a documents that links to other PDF documents that
reside within the same folder.<br>
So within my document I will write the following Syntax</p>
<p><code>[This is the PDF I am referring
to](./the_other_pdf_document.pdf)</code></p>
<p>Everything works fine when I preview it in Marked. I get in to
trouble when I export my Document into a pdf.<br>
The PDF Export will resolve the relative links to fixed one like
this</p>
<p><code>file:///Users/..../the_other_pdf_document.pdf</code></p>
<p>Is there a way to retain the relative links?</p>
<p>Cheers</p></div>k.wilczektag:support.markedapp.com,2011-09-11:Comment/341390232014-08-14T12:39:21Z2014-08-14T12:39:21ZRelative Links to Files with Export<div><p>I'm afraid this comes down to the same bug that keeps
intra-document<br>
links from working. WebKit's PDF export breaks all file links by
making<br>
them absolute, and relative links always end up pointing to the
wrong<br>
spot.</p>
<p>There are alternative (and much less convenient) means of
generating a<br>
PDF, if you need this functionality. You might look into
wkhtml2pdf, a<br>
command line tool that allows you to export HTML from Marked and
then<br>
convert it to a PDF with links intact. Let me know if you need
any<br>
assistance getting that working.</p>
<p>Hopefully this bug will be fixed soon. It's already fixed in the
open<br>
source WebKit thread, but not in the version that Apple
provides.</p>
<p>-Brett</p></div>Brett