Add support for jpg and bmp
This commit is contained in:
@ -7,6 +7,8 @@ doc.addParagraph(paragraph);
|
||||
|
||||
const image = doc.createImage("./demo/images/image1.jpeg");
|
||||
const image2 = doc.createImage("./demo/images/dog.png");
|
||||
const image3 = doc.createImage("./demo/images/cat.jpg");
|
||||
const image4 = doc.createImage("./demo/images/parrots.bmp");
|
||||
|
||||
var exporter = new docx.LocalPacker(doc);
|
||||
exporter.pack('My Document');
|
||||
|
BIN
demo/images/cat.jpg
Normal file
BIN
demo/images/cat.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 154 KiB |
BIN
demo/images/parrots.bmp
Normal file
BIN
demo/images/parrots.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 818 KiB |
@ -2,6 +2,8 @@
|
||||
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
|
||||
<Default Extension="png" ContentType="image/png"/>
|
||||
<Default Extension="jpeg" ContentType="image/jpeg"/>
|
||||
<Default Extension="jpg" ContentType="image/jpeg"/>
|
||||
<Default Extension="bmp" ContentType="image/bmp"/>
|
||||
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" />
|
||||
<Default Extension="xml" ContentType="application/xml" />
|
||||
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" />
|
||||
|
Reference in New Issue
Block a user