markswindoll / jQuery-Word-Export

jQuery plugin for exporting HTML and images to a Microsoft Word document
http://markswindoll.github.io/jquery-word-export/
MIT License
220 stars 145 forks source link

About the IE support. #6

Open luckerxia opened 9 years ago

luckerxia commented 9 years ago

I use IE 10, the image cann't show, base64 code isn't generation.

--NEXT.ITEM-BOUNDARY Content-Location: http://****/images/ECharts.png Content-Type: data: Content-Transfer-Encoding: data:

--NEXT.ITEM-BOUNDARY--

breezing commented 9 years ago

Hi

That's probably because following codes, as width and height return 0 under IE. I have added width and height attribute to img element, but it doesn't work... // Calculate dimensions of output image var w = Math.min(img[i].width, options.maxWidth); var h = img[i].height * (w / img[i].width);

Divyeshkotadia commented 7 years ago

@breezing you are correct. Just by adding width and height attributes in image tag and it created canvas object with data. Hope this helps!!!