Document Converters DOCX Converter Compress DOCX files PNG Image Format PNG Converter PNG is a common type of image file. The file extension PNG is short for ‘Portable Network Graphic’, and the format was created to offer improvements over the GIF format. Like JPG, PNG is a 2D ‘ra...
使用Document.save(string, ImageSaveOptions)方法将每个页面转换为 PNG 。 以下代码示例展示了如何使用不同的选项自定义 Java DOC 到 PNG 的转换。 // load document Document doc = new Document("calibre.docx"); // set output image format using SaveFormat var options = new ImageSaveOptions(SaveFormat....
public static void wordToImg(InputStream inputStream, File imgFile) { try { com.aspose.words.Document doc = new com.aspose.words.Document(inputStream); ImageSaveOptions options = new ImageSaveOptions(SaveFormat.PNG); options.setPrettyFormat(true); options.setUseAntiAliasing(true); options.setUs...
Word To Image Converter is a professional and powerful Word document to Image converter (JPEG, JPG, TIFF, GIF, TIF, PNG, EXIF, BMP, EMF ). With it, you can convert your doc, docm, rtf, docx files to any type of images like jpg, jpeg, tif, gif, bmp, emf, png, exif in batches...
converter.convert(wordInputStream).as(DocumentType.DOC).to(byteArrayOutputStream).as(DocumentType.PDF).execute();returnbyteArrayOutputStream.toByteArray(); }/*** pdf转图片 * *@parampdfData pdf字节数据 *@paramscale 图片比例(A scale of 1 will render at 72 DPI.) ...
{StringwordFilePath="path/to/word/document.docx";StringoutputImagePath="path/to/output/image.png";XWPFDocumentdocument=newXWPFDocument(newFileInputStream(wordFilePath));List<XWPFPictureData>pictures=document.getAllPictures();for(inti=0;i<pictures.size();i++){XWPFPictureDatapicture=pictures.get(i)...
Okdo Word to Image Converter is the most powerful Word to Image document converter. Own the most powerful conversion function, you can batch convert word to image with ease. The program can convert with high output quality and very fast speed.
Keep the style and layout of the source document to the fullest extent possible.。 Support the choice of picture format and resolution, support Word to Png, Word to Jpeg, Word to Bmp, Word to Tiff, Word to Emf. The higher the resolution you set, the clearer the picture is, and the ...
private static List<BufferedImage> wordToImg(InputStream inputStream) throws Exception { if (!isWordLicense()) { return null; } try { long old = System.currentTimeMillis(); Document doc = new Document(inputStream); ImageSaveOptions options = new ImageSaveOptions(SaveFormat.PNG); ...
使用自定义分辨率将 Word 转换为 PNG 分辨率越高的图像通常越清晰。您可以按照以下步骤在将 Word 转换为 PNG 时自定义图像分辨率。 创建一个文档对象。 使用Document.loadFromFile()方法加载 Word 文件。 使用Document.saveToImages()方法将文档转换为具有指定分辨率的BufferedImage图像。