tag:support.markedapp.com,2011-09-11:/discussions/suggestions/8640-relative-links-in-a-pdfMarked: Discussion 2017-09-27T16:10:41Ztag:support.markedapp.com,2011-09-11:Comment/326761112014-04-23T16:27:05Z2014-04-23T16:27:05ZRelative links in a PDF<div><p>I don't think this is really possible with the way that webkit
generates<br>
PDFs. I would have to rewrite all of the links in the document
prior to<br>
exporting the PDF, anyway...</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/326761112014-04-23T16:33:01Z2014-04-23T16:33:02ZRelative links in a PDF<div><p>True.</p>
<p>There's also the base tag. Inserting that into the head of the
document would set the links. You'd have to use an absolute URL for
the CSS and anything else in the document, though.</p></div>Steven Fishertag:support.markedapp.com,2011-09-11:Comment/326761112014-04-23T16:46:28Z2014-04-23T16:46:28ZRelative links in a PDF<div><p>Not for PDF output, I don't think. I already set a base tag via
JS when<br>
the document loads.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/326761112014-04-23T16:47:35Z2014-04-23T16:47:37ZRelative links in a PDF<div><p>Yeah, I assume you'd have to actually mutate the HTML for it to
take for the PDF export. Javascript's probably never going to run
on the PDF path.</p>
<p>Anyway, have a great day. :)</p></div>Steven Fishertag:support.markedapp.com,2011-09-11:Comment/326761112014-04-23T16:49:02Z2014-04-23T16:49:02ZRelative links in a PDF<div><p>The PDF prints from the current contents of the web view, so JS
run<br>
prior to the print action does stick. The base url just doesn't
seem to<br>
affect PDF output.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/326761112017-09-27T14:07:10Z2017-09-27T14:07:13ZRelative links in a PDF<div><p>Is this still a known issue of PDF exporting to create cross-reference links in multi-markdown?</p>
<p>Any way to get this working with the PDF export, without losing my custom header/footer?</p>
<h2><a name="create-links-to-generic-headers-using-a-cross-reference" class="anchor" href="#create-links-to-generic-headers-using-a-cross-reference"></a>Create Links to Generic Headers Using a Cross-Reference</h2>
<pre>
<code> ### Overview [MultiMarkdownOverview] ##
[MultiMarkdownOverview]</code>
</pre>
<h2><a name="create-links-to-headers" class="anchor" href="#create-links-to-headers"></a>Create Links to Headers</h2>
<pre>
<code> ## Section 1 [sect1] ##
... text content
[Jump to Section 1][sect1]</code>
</pre></div>Paul Solttag:support.markedapp.com,2011-09-11:Comment/326761112017-09-27T16:10:39Z2017-09-27T16:10:39ZRelative links in a PDF<div><p>Hi Paul,</p>
<p>I'm afraid it's still an issue, yes. There's no workaround within Marked, but it can be set up with Pandoc or wkhtml2pdf. Pandoc for sure can handle headers and footers, I'm not sure about wkhtml2pdf. Neither are super convenient, though, apologies.</p>
<p>I'm still hoping Apple will just hand me a solution in an Xcode update, but it hasn't happened yet. I'm currently working on the RTF export, but once that's fully production-ready, I'll be focusing on building my own PDF output rather than using the PDF print system in WebKit.</p></div>Brett