PDFlib is not a converter, and can not convert HTML fragments to PDF. If you use Textflow, you must translate the HTML attributes into known PDFlib options. Depending on your input data, this can be a non-trivial task.
Answer from Rainer on Stack OverflowI've got the pdf-lib part down. I can download the pdf or display it in an iframe. But I just want to display it in a browser tab. I'm pretty sure it's possible and that I'm missing some detail.
see this jsfiddle: https://jsfiddle.net/dreamgear/pzo086kr/5/
What I've tried has to do with the Blob and objectURL stuff commented out at the end.
Apparently I transgressed with the flair thing. I hope this is better.
I want to convert the Html file to pdf. And my app is WPF.
I have found IronPdf and SynFusion Html to pdf conversion library but they are way costly for my free project.
» npm install html-pdf
» npm install html-pdf-node
» npm install pdf-lib