https://stackoverflow.com/questions/16183748/how-to-escape-html-in-node-js-ejs-view
ejs is probably escaping it, try using this

<%- pdfAddPageItem(content1) -%>