Edit:

This one seems to work well: pdconsec.vscode-print

Link: https://marketplace.visualstudio.com/items?itemName=pdconsec...

And of course it just renders an HTML document (applies some CSS to the text content) and then uses the embedded browser's printing.