vscode-markdown-pdf
vscode-markdown-pdf copied to clipboard
Bug: Image inclusion in nested markdown document
Images in sub-documents don't seem to be correctly located. It generates a broken Image + Alt-text.
a.md
## Heading
:[Sub-document](../b/b.md)
b.md
## Heading

Really would like this feature. Just as an implementation idea, potentially the images could be converted to base64 and then embedded in the doc.
Not really sure about the PDF format, but that should work for html. It would make the html file really large, but it could be an easy first step and as a benefit to get PDFs, once that was complete you could use the browser 'print to pdf' function.
If this is your flow to get a pdf, then the size of the file size is not important.
@thepian I just realized this does work, but I was making a silly error. If you use must use a relative path not an absolute path.
These both work:


but not this:

If that still doesn't work for you, I also used a node module markdown-pdf which is when I realized my error.
This was the convertToPdf.js
script I made to use that.
var markdownpdf = require('markdown-pdf')
var fs = require('fs')
markdownpdf()
.from('README.md')
.to('README.pdf', function () {
console.log('Done')
})