alanshaw / markdown-pdf

:page_facing_up: Markdown to PDF converter
https://npmjs.org/package/markdown-pdf
MIT License
2.71k stars 253 forks source link

CSS3 support - in header and footer #59

Open silverki opened 9 years ago

silverki commented 9 years ago

Have I understood correctly that there is no CSS3 support?

silverki commented 9 years ago

Yes there is. Issue is that @font-face font is not used in header and footer.

anko commented 9 years ago

Could you create a simple test case?

timactive commented 7 years ago

+1

PradyumnaR commented 7 years ago

Unable to insert image tag in header and footer.....

markdown options

options{ runningsPath: path.join('runnings.js') }

runnings.js

exports.header = { content: function (..,..){ return ""//image } }

Thanks in advance.

maethor commented 7 years ago

Hi,

You said it's possible, but how do you apply css on header and footer? What is the class or the id?

Thanks.

PradyumnaR commented 7 years ago

Hi maethor, I was able to solve this issue. Header and footer supports only inline css styling we cannot import or do external styling. check this link for more detailed work on header and footer: https://jsreport.net/learn/phantom-pdf

maethor commented 7 years ago

Thank you @PradyumnaR

Indeed, I also managed it with inline css.

This seems strange, because https://atom.io/packages/markdown-themeable-pdf, which seems to works just like this, manage css in footer pretty nicely.

neooblaster commented 5 years ago

Hi All,

I'm also interested for CSS support for headers/footers to centralize the customisation, using ID/Class/Tag.

Thanks for all !