foliojs / pdfkit

A JavaScript PDF generation library for Node and the browser
http://pdfkit.org/
MIT License
9.82k stars 1.15k forks source link

How would one add an svg based image inside the text sized to the text? #978

Open ThaDaVos opened 5 years ago

ThaDaVos commented 5 years ago

Question

Like the title says - how would one add an svg based image inside the text flow (not below)?

Description

I'm currently looking at https://github.com/twitter/twemoji-parser to parse the unicode emoji's to SVG but how would I include them inside the text and size them to the font-size?

I've already got a project which parses HTML to PDF but there are some flaws and PDFKit doesn't seem to have them - except how to add Emoji's.

TBGerstenberg commented 4 years ago

Hi there, I understand you are asking this because you are trying to build support for emojis in using PDFkit, correct? As I am looking for the same, are there any news Emoji support in PDFKit as of (almost) 2020?

Kind Regards

rodrigobutta commented 4 years ago

Hi! Same question here. Have you found any workaround for this? I think it will be quite complicated to put an SVG right in place and size where the emoji code point shoud be. @TobiGe @ThaDaVos