2, the code block
` ` `
Private static ListWordToImg (InputStream InputStream, int pageNum) throws the Exception {
if (! IsLicense ()) {
//unauthorized, let through
//return null;
}
Try {
Document doc=new Document (inputStream);
ImageSaveOptions options=new ImageSaveOptions (SaveFormat. PNG);
Options. SetPrettyFormat (true);
Options. SetUseAntiAliasing (true);
Options. SetUseHighQualityRendering (true);
Int pageCount=doc. GetPageCount ();
If (pageNum!=1 & amp; & PageCount & gt; PageNum) {//generated before pageCount zhang
PageCount=pageNum;
}
ListImageList=new ArrayList<> (a);
For (int I=0; iOutputStream output=new ByteArrayOutputStream ();
Options. SetPageIndex (I);
Doc. Save (output, options);
ImageInputStream ImageInputStream=javax.mail. Imageio. Imageio. CreateImageInputStream (parse (output));
ImageList. Add (javax.mail imageio. Imageio. Read (imageInputStream));
}
Return imageList;
} the catch (Exception e) {
e.printStackTrace();
throw e;
}
}
` ` `
3, there will not be any abnormal, will only come out the picture (the picture of the red X icon), abnormal images,
4, everyone involved can communicate,
CodePudding user response:
Used spire. Doc. Jar to into images, contains the word of the picture turned out, after you said this didn't happen, you use the free version of spire to conversion try look at effect how,CodePudding user response:
Spire. Doc. Jar can realize turn word pictures, but there is no aspose time-consuming and clarity - good words,Now and then tries to analyze grab images (realized) in the word, but this scheme has two pieces of risk for the time being: 1. The location of the image which belongs to the word of a page, 2. A page if there are both text and images. What should I do,