tag:support.markedapp.com,2011-09-11:/discussions/questions/16-preserving-links-and-cross-references-in-pdf-outputMarked: Discussion 2012-08-26T20:50:55Ztag:support.markedapp.com,2011-09-11:Comment/108648372011-10-25T13:04:14Z2011-10-25T13:04:14Zpreserving links and cross-references in PDF output<div><p>I'm afraid I don't understand the question. They're showing up
as blue and you don't want them to? Or they're showing up as blue
and they don't work?</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/108648372011-10-25T13:05:50Z2011-10-25T13:05:51Zpreserving links and cross-references in PDF output<div><p>My bad. Links showing up as blue is fine. Problem is they don't
work as active links in PDFs. Is there some trick to make them
"active" links in PDFs?</p></div>Mathewtag:support.markedapp.com,2011-09-11:Comment/108648372011-10-25T14:36:11Z2011-10-25T14:36:11Zpreserving links and cross-references in PDF output<div><p>So we're talking about both internal and external links, right?
I'll do some testing, but it may come back to the way that WebKit
handles PDF output. I'm not certain at this point that I'll have a
fix, but I will definitely look into it. I know PDF output is an
important facet of handling Markdown files for many users.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/108648372011-10-25T14:58:58Z2011-10-25T14:58:59Zpreserving links and cross-references in PDF output<div><p>Yes, both internal and external links are not active in a final
PDF.</p>
<p>Here's what's strange to me: if I put in a raw http address that
will not be colored, but it will be an active link in the final
PDF. But if I put in nicely formatted multimarkdown code for http
(or cross refs) then they'll be colored but not be active.</p></div>Mathewtag:support.markedapp.com,2011-09-11:Comment/108648372011-10-27T14:06:23Z2011-10-27T14:06:23Zpreserving links and cross-references in PDF output<div><p>Like I said, this is going to be a WebKit issue that
<em>may</em> be out of my hands, but I'll definitely look into it.
Extensively, actually, as preserving links would be a major benefit
if I can make it work.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/108648372011-10-27T15:23:26Z2011-10-27T15:23:26Zpreserving links and cross-references in PDF output<div><p>Brett: Thanks for looking into this. I fully understand there
may be no<br>
solution, but if anyone can figure out a way to solve this it's
you! Just<br>
glad you're willing to explore the possibilities.</p>
<pre>
<code>- Mathew</code>
</pre></div>Mathew Mitchelltag:support.markedapp.com,2011-09-11:Comment/108648372011-11-02T14:14:04Z2011-11-02T14:14:04Zpreserving links and cross-references in PDF output<div><p>It's definitely WebKit. Even Safari can't save a PDF and
preserve anything other than links on text that actually looks like
a url (same as Marked). The only app on OS X that seems to be able
to create a PDF that Preview can read with proper links is Pages,
but it uses a completely different rendering engine.</p>
<p>Because this is an important feature, I'm working on building my
own rendering code instead of using the content of the WebKit
preview, but it will have the drawback of not being able to fully
render the output the way the preview shows it. I have not found a
way around that yet.</p>
<p>By the way, opening one of the PDF's output by Marked in Adobe
Reader and saving as an Adobe PDF seems to restore the link
functionality. Preview can't do it, but for some reason Acrobat can
read the links properly in some cases.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/108648372011-11-02T15:32:11Z2011-11-02T15:32:11Zpreserving links and cross-references in PDF output<div><p>Brett: Thanks for the update. I tested with Acrobat Pro but no
luck with links<br>
preserved, even within Acrobat.</p>
<p>I don't know how big an issue it will be if output does not
render same as preview.<br>
I guess it will depend on how much discrepancy there is. I
appreciate the problem<br>
is complex though!</p>
<p>Many thanks for continuing to look into this issue.</p>
<pre>
<code>- Mathew</code>
</pre></div>Mathew Mitchelltag:support.markedapp.com,2011-09-11:Comment/108648372011-11-03T14:48:02Z2011-11-03T14:48:03Zpreserving links and cross-references in PDF output<div><p>My workaround for the problem is to save the doc as html and use
<em>htmldoc</em> command:</p>
<blockquote>
<p>htmldoc -f cv.pdf --header "" --footer "" --webpage cv.html
--linkcolor navy --linkstyle plain</p>
</blockquote>
<p>Hopefully, you'd integrating the functionality into Marked.
Thanks.</p></div>THCtag:support.markedapp.com,2011-09-11:Comment/108648372012-01-13T18:39:22Z2012-01-13T22:35:23Zpreserving links and cross-references in PDF output<div><p>Sounds very odd that text that is a URL comes through as
clickable, but markdown-formatted URLs do not. Are you creating the
links differently?</p>
<p>If this is indeed a Webkit problem, please file a bug report
with apple (<a href=
"http://bugreport.apple.com">http://bugreport.apple.com</a>) and
send me the Radar Id if you don't mind :)</p></div>Eric Vitiellotag:support.markedapp.com,2011-09-11:Comment/108648372012-01-13T18:45:38Z2012-01-13T18:45:38Zpreserving links and cross-references in PDF output<div><p>Try it in Safari, you'll get the same results. I'll file a bug
report once I'm back from CES.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/108648372012-01-13T18:57:09Z2012-01-13T22:35:24Zpreserving links and cross-references in PDF output<div><p>Cool. have a nice time :) I'll see what I can do about getting
it fixed.</p></div>Eric Vitiellotag:support.markedapp.com,2011-09-11:Comment/108648372012-01-14T00:43:01Z2012-01-14T00:43:01Zpreserving links and cross-references in PDF output<div><p>This bug has been resolved in WebKit.</p>
<p><a href=
"https://bugs.webkit.org/attachment.cgi?id=121534&action=review">
https://bugs.webkit.org/attachment.cgi?id=121534&amp;action=review</a></p></div>Eric Vitiellotag:support.markedapp.com,2011-09-11:Comment/108648372012-01-16T20:35:13Z2012-01-16T20:35:13Zpreserving links and cross-references in PDF output<div><p>Hopefully this fix will be applied soon to the version of webkit
embedded by Xcode. As soon as the fix is available to third-party
applications, it will be included in Marked.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/108648372012-02-27T04:04:26Z2012-02-27T04:04:26Zpreserving links and cross-references in PDF output<div><p>I just tested this against the Safari 5.2 framework and it
preserves external links perfectly. Internal (cross-reference)
links aren't followed, but I'll see if there's a workaround for
that. I don't know the public release schedule for 5.2, but it
shouldn't be far off.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/108648372012-02-27T13:43:08Z2012-02-27T13:43:08Zpreserving links and cross-references in PDF output<div><p>This is great news re: external links! Thanks for the
update,</p>
<pre>
<code>Mathew</code>
</pre></div>Mathew Mitchelltag:support.markedapp.com,2011-09-11:Comment/108648372012-03-21T00:10:13Z2012-08-26T20:16:59Zpreserving links and cross-references in PDF output<div><p>I noticed that when I add a @media print section to my
stylesheet and define the color of the a tag within this section,
the external links keep working after a print as PDF.</p></div>Gunther Groenewege