We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ConvertEffect

License license=new License();
license.setLicense(MyDir+"Aspose.Total.Java.lic");
Document wordDocument = new Document(MyDir + "1.doc");
wordDocument.acceptAllRevisions();
com.aspose.words.ImageSaveOptions imgSaveOptions = new com.aspose.words.ImageSaveOptions(
com.aspose.words.SaveFormat.JPEG);
imgSaveOptions.setPrettyFormat(true);
imgSaveOptions.setUseHighQualityRendering(false);
com.aspose.words.HtmlFixedSaveOptions htmlFixedSaveOptions = new com.aspose.words.HtmlFixedSaveOptions();
htmlFixedSaveOptions.setPrettyFormat(true);
htmlFixedSaveOptions.setExportEmbeddedCss(true);
htmlFixedSaveOptions.setExportEmbeddedFonts(true);
htmlFixedSaveOptions.setExportEmbeddedImages(true);
htmlFixedSaveOptions.setExportEmbeddedSvg(true);
htmlFixedSaveOptions.setWarningCallback(new com.aspose.words.IWarningCallback() {

@Override
public void warning(com.aspose.words.WarningInfo warningInfo) {
System.out.println(warningInfo.getDescription());
}
});
for (Field field : wordDocument.getRange().getFields()) {
if (field.getType() == FieldType.FIELD_HYPERLINK) {
FieldHyperlink hyperlink = (FieldHyperlink) field;
hyperlink.setTarget("_blank");
}
}

htmlFixedSaveOptions.setPageIndex(0);
htmlFixedSaveOptions.setPageCount(1);

wordDocument.save(MyDir + "Out.html", htmlFixedSaveOptions);
int pageCount = wordDocument.getPageCount();
for (int i = 0; i < pageCount; i++) {
htmlFixedSaveOptions.setPageIndex(i);
htmlFixedSaveOptions.setPageCount(1);

wordDocument.save(MyDir + "Out\\Out" + (i + 1) + "-svg.html", htmlFixedSaveOptions);
imgSaveOptions.setPageIndex(i);
imgSaveOptions.setPageCount(1);
}



License license = new License();
license.setLicense(MyDir + "Aspose.Total.Java.lic");
Presentation pptDocument = new Presentation(MyDir + "1.ppt");
int pageCount = pptDocument.getSlides().size();
ISlide pageSlide = null;
for (int i = 0; i < pageCount; i++) {
pageSlide = pptDocument.getSlides().get_Item(0);
BufferedImage bufferedImage = pageSlide.getThumbnail(1.5f, 1.5f);
ImageIO.write(bufferedImage, "jpeg", new FileOutputStream(MyDir + "Out\\Out" + (i + 1) + "-svg.jpeg"));
}


when convert doc to jpeg,the color red was not good effect..


Hi Xu,

Unfortunately, your questions are not clear enough therefore we request you to please elaborate your inquiry further by providing complete details of problems you're getting with 1.doc, 2.doc, 2.pptx and 3.docx. This will help us to understand your scenarios, and we will be in a better position to address your concerns accordingly. Thanks for your cooperation.

Best regards,

can you use my code to convert them?and see how ?

Hi Xu,


Regarding 3.docx, please ZIP and attach following font file here for testing:

  • 华文细黑

Regarding 2.pptx, I would suggest you please report this issue in Aspose.Slides Product Family forum where you’ll be guided appropriately. Thanks for your cooperation.

Best regards,

Hi Xu,


Thanks for your inquiry. We are working over your query and will get back to you soon.

Best regards,

Hi Xu,


It is to update you that we had logged the following issues in bug tracking system.

WORDSNET-14573: A paragraph wraps to next line in fixed page formats (<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace; background-color: rgb(255, 255, 255); font-size: 1em;”>3.docx)
WORDSNET-14574: Vertical space added between header and body content on 2nd page in HtmlFixed (<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace; background-color: rgb(255, 255, 255); font-size: 1em;”>2.doc)
WORDSNET-14575: Header content is different on 3rd page of HtmlFixed (<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace; background-color: rgb(255, 255, 255); font-size: 1em;”>2.doc)

Your thread has also been linked to the appropriate issues and you will be notified as soon as they’re resolved. Sorry for the inconvenience.

Best regards,

Hi Xu,


It is to inform you that implementation of all your linked issues have been postponed for now (No ETA available). We will inform you via this thread as soon as these issues are resolved. We apologize for any inconvenience.

Regarding WORDSNET-14573, the issue occurs because the document has the “Control character spacing” option set to “Compress only punctuation”. Aspose.Words currently wraps the line incorrectly because it does not support that option.

Regarding WORDSNET-14574, the issue occurs because Aspose.Words currently does not use a narrow space to the left of a floating table when wrapping text around it.

Regarding WORDSNET-14575, the issue occurs because the contents of page 2 is shifted down in Aspose.Words current output because of the issue described in WORDSNET-14574 (the beginning of the documents in both issues is very similar).

As the contents is shifted down, a continuous section break which flows to the bottom of page 2 in MS Word is placed on page 3 in Aspose.Words layout. Because of that, page 3 header is taken from a different section in Aspose.Words, and that header is different. The header is never showed in MS Word because its parent section does not start any page. However if some paragraph are added to page 2, MS Word displays a different header on page 3 as well.

The issue should go away when WORDSNET-14574 is fixed. You may link the problematic section header to the previous section as a workaround.

Best regards,

@landray.com.cn,

The issues you have found earlier (filed as WORDSNET-14574 and WORDSNET-14575) have been fixed in this Aspose.Words for .NET 17.8 update and this Aspose.Words for Java 17.8 update.

@landray.com.cn,

The issues you have found earlier (filed as WORDSNET-14573) have been fixed in this Aspose.Words for .NET 17.9 update and this Aspose.Words for Java 17.9 update.