marcbachmann / node-html-pdf

This repo isn't maintained anymore as phantomjs got dreprecated a long time ago. Please migrate to headless chrome/puppeteer.
MIT License
3.55k stars 544 forks source link

Issue with SVG images #78

Open LukaHorvat opened 8 years ago

LukaHorvat commented 8 years ago

It appears that I can't embed SVG images in my PDFs. If the HTML contains the svg image included in the markup then it works, but if I reference an image like <img src="image.svg"> then it's simply not included in the PDF.

AlexanderSuv commented 8 years ago

@LukaHorvat Try to set full path to source <img src="http://localhost:8888/image.svg">

lhf552004 commented 7 years ago

@AlexanderSuv , can I set local source like this: <img src='/home/pi/projects/FLCos/imgs/mycode.png' /></div> OS: CentOS

molerat619 commented 7 years ago

Fixed?

pfraces commented 7 years ago

Same here. I cannot embed SVGs in tag using http:// urls. It is embedded using file:// protocol though

DorianW commented 3 years ago

Did you try to set the base option? This fixed it for me...