Open varadeth opened 1 year ago
I am trying to convert svg with devanagari fonts and it is not rendering the way it was supposed to.
Following is the code that I am trying to use
const svg = fs.readFileSync('random.svg').toString(); const doc = new PDFDocument(); const fontData = fs.readFileSync('./NotoSansDevanagari/NotoSansDevanagari-Regular.ttf'); doc.registerFont('NotoSansDevanagari', fontData); SVGToPDF(doc, svg, 0, 0, {fontCallback: () => { return 'NotoSansDevanagari'; }}) doc.pipe(res) doc.end()
Below is the svg file I am trying to convert and it is getting converted to response.pdf
I am trying to convert svg with devanagari fonts and it is not rendering the way it was supposed to.
Following is the code that I am trying to use
Below is the svg file I am trying to convert and it is getting converted to response.pdf