Package org.docx4j.samples
Class ImageAdd
java.lang.Object
org.docx4j.samples.ImageAdd
Examples of adding images to a docx
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic PnewImage(WordprocessingMLPackage wordMLPackage, byte[] bytes, String filenameHint, String altText, int id2) Create image, without specifying widthstatic PnewImage(WordprocessingMLPackage wordMLPackage, byte[] bytes, String filenameHint, String altText, int id2, long cx) Create image, specifying width in twips
-
Constructor Details
-
ImageAdd
public ImageAdd()
-
-
Method Details
-
main
- Throws:
Exception
-
newImage
public static P newImage(WordprocessingMLPackage wordMLPackage, byte[] bytes, String filenameHint, String altText, int id2) throws Exception Create image, without specifying width- Throws:
Exception
-
newImage
public static P newImage(WordprocessingMLPackage wordMLPackage, byte[] bytes, String filenameHint, String altText, int id2, long cx) throws Exception Create image, specifying width in twips- Throws:
Exception
-