cakebake / markdown-themeable-pdf

ARCHIVED. NOT MAINTAINED. Themeable Markdown Converter (Print to PDF, HTML, JPEG or PNG)
https://atom.io/packages/markdown-themeable-pdf
133 stars 37 forks source link

Reference local images within header and footer #5

Closed enjoylife closed 9 years ago

enjoylife commented 9 years ago

Only see the TODO message in the docs. Is there any status on this feature?

cakebake commented 9 years ago

It is planned for the near future. One of the next steps for 1.0 :) I put this issue on closed, when it works. In the meantime, you can use absolute paths?

arnekolja commented 9 years ago

Absolute paths don't work.

module.exports = function () {
    return {
        height: '2cm',
        contents: '<div style="text-align: center;"><span><img src="/Users/arne/.atom/markdown-themeable-pdf/logo.jpg" /></span></div>'
    };
};

gives just a blank header, no matter if I give an PNG or JPG. The path is definitely correct.

edit: CSS images don't work, either.

cakebake commented 9 years ago

New status: I need this feature in any case this week for a manual for one of our products, too ;)

@arnekolja Paths should be start with file:///.

Why base64 encoded pictures as img-src do not work is still a mystery.