node-html-pdf icon indicating copy to clipboard operation
node-html-pdf copied to clipboard

Issue with SVG images

Open LukaHorvat opened this issue 10 years ago • 5 comments

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.

LukaHorvat avatar Oct 17 '15 20:10 LukaHorvat

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

AlexanderSuv avatar Nov 26 '15 19:11 AlexanderSuv

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

lhf552004 avatar Aug 12 '16 04:08 lhf552004

Fixed?

molerat619 avatar Nov 08 '16 14:11 molerat619

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

pfraces avatar Jul 13 '17 10:07 pfraces

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

DorianW avatar Jul 05 '21 14:07 DorianW