I know is an old ask, but I've had too painful time with pdf converter.
For the emojis I use pandoc
to convert markdown
in html
and twemoji to convert emoji in svg with this metadata.yml:
header-includes: |
<link rel="stylesheet" href="./style.css">
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https://twemoji.maxcdn.com/v/latest/twemoji.min.js" crossorigin="anonymous"></script>
<script>
$(document).ready
(
function()
{
twemoji.parse(document.body);
}
);
</script>
And in css
.emoji {
display: inline-block;
width: 1em;
height: 1em;
vertical-align: -.1em;
}
build the html:
pandoc -s my_doc.md -o my_doc.html --metadata-file metadata.yml --from markdown+emoji
After that I use chromium to make my pdf with
chromium --headless --disable-gpu --print-to-pdf=my_doc.pdf my_doc.html --print-to-pdf-no-header
But can work with pandoc html to pdf, just a better engine for javascript to me.
This is the smarter and simplest way I fine to deal with emojis, pdf and markdown.