Brett on 06 Oct, 2013 02:38 PM
As mentioned in other discussions, it's a webkit bug, which is what Marked uses to display the preview and export PDFs. The bug has been fixed in the open source version of WebKit, but hasn't been integrated by Apple. When they do, it will work, but until then, not within Marked.
wkhtmltopdf uses it's own patched version of WebKit, which I may have to resort to at some point.
Brett on 24 Oct, 2013 09:12 PM
1. Marked converts hr’s and <!—BREAK—> by replacing it with a div with style "page-break-before:always". This only works when Marked is printing to PDF, it wouldn’t necessarily translate to an exported HTML file. You could easily add (or shell convert) your own divs and embed the styles directly, though.
2. I’ve looked at solutions from Pandoc to wkhtmltopdf to wkpdf, but every time either size or license issues have been a problem. I’d consider adding an export processor, but there are so many options to consider when using those converters that it would require a lot of configuration on the user’s part. If you’re already capable of doing the conversion on the command line, it might just be prudent to export the html from Marked and have a Hazel process do the conversion via script…
That being said, I’ll look back into wihtmltopdf and see if it’s a feasible option.
Brett on 25 Oct, 2013 07:55 PM
Correct on MultiMarkdown 4.
As far as the workflow goes, do you still want the output PDF to have Marked styles? If that’s the case, you’ll need to use a webkit-compatible PDF generator like wkhtmltopdf or wkpdf to do the build as a command line tool. You’ll need to export the CSS from your preferred or custom style and then include it via command line options with the CLI.
Most of Marked’s features, such as Table of Contents and pagination tweaks aren’t available without Marked running. If your needs are simple, though, a wkhtmltopdf workflow with included CSS may work fine.
I am wondering if this has been resolved. I'm using Marked Version 2.4.11 (895), and when I generate a paginated PDF, the links within the document are visible but do not correctly link. If it hasn't been fixed, is there a workaround that can be employed?
Brett on 07 Apr, 2015 04:33 PM
There has been no change to WebKit's handling of intra-document
links at this point. The only workaround would still be to export
to HTML and use wkhtlm2pdf, but the same problems with certain
syntax not being carried over will exist.