Landray Words Problems here!

We will supply you with our test client and source code.

All we test method is:
java -jar wordsToHTML.jar filepath

eg:java -jar wordsToHTML.jar C:\Users\Lixp\DeskTop\1.docx
and the file path can also be a relative path
eg:java -jar wordsToHTML.jar srcfiles\subdirectory\1.docx

the client is like below:

you should replace the newest aspose-word.jar and rename it.
the converted files will be like below:

convert source code:

private void wordsToHTML(IKmssFile kmssFile) throws Throwable {
    int pageCount;
    InputStream inputStream = null;
    OutputStream outputStream = null;
    IConvertFile convertFile = null;
    String fileKey = “page-”;
    printInfo(“attmainid:” + kmssFile.getAttMainId()
            + " words document to html start.\n");
    long startTime = System.currentTimeMillis();
    com.aspose.words.Document wordDocument = null;
    try {
        inputStream = kmssFile.getInputStream();
        printInfo(“attmainid:” + kmssFile.getAttMainId()
                + " words document to html(read doc start).\n");
        wordDocument = new com.aspose.words.Document(inputStream);
        wordDocument.acceptAllRevisions();
        printInfo(“attmainid:” + kmssFile.getAttMainId()
                + " words document to html(read doc over).\n");
        com.aspose.words.HtmlFixedSaveOptions saveOptions = new com.aspose.words.HtmlFixedSaveOptions();
        saveOptions.setPrettyFormat(true);
        saveOptions.setExportEmbeddedCss(true);
        saveOptions.setExportEmbeddedFonts(true);
        saveOptions.setExportEmbeddedImages(true);
        saveOptions.setExportEmbeddedSvg(true);
        saveOptions
                .setWarningCallback(new com.aspose.words.IWarningCallback() {

                    @Override
                    public void warning(
                            com.aspose.words.WarningInfo warningInfo) {
                        printInfo(warningInfo.getWarningType() == com.aspose.words.WarningType.FONT_SUBSTITUTION ? (“Font substitution: " + warningInfo
                                .getDescription()) : “”);
                    }
                });
        pageCount = wordDocument.getPageCount();
        for (int i = 0; i < pageCount; i++) {
            if (i == 0) {
                printInfo(“attmainid:”
                + kmssFile.getAttMainId()
                        + " words document to html(generate thumbnail start).\n”);
                convertFile = kmssFile.newConvertFile(“thumbnail-source”);
                outputStream = convertFile.getOutputStream();
                com.aspose.words.ImageSaveOptions imgSaveOptions = new com.aspose.words.ImageSaveOptions(
                        com.aspose.words.SaveFormat.JPEG);
                imgSaveOptions.setPrettyFormat(true);
                imgSaveOptions.setUseHighQualityRendering(false);
                imgSaveOptions.setPageIndex(0);
                imgSaveOptions.setPageCount(1);
                wordDocument.save(outputStream, imgSaveOptions);
                outputStream.close();
                outputStream = kmssFile.newConvertFile(“thumbnail”)
                        .getOutputStream();
                ThumbnailUtil.resizeByHeight(666, outputStream,
                        convertFile.getInputStream());
                convertFile.getInputStream().close();
                outputStream.close();
                printInfo(“attmainid:”
                + kmssFile.getAttMainId()
                        + " words document to html(generate thumbnail over).\n");
            }
            saveOptions.setPageIndex(i);
            saveOptions.setPageCount(1);
            convertFile = kmssFile.newConvertFile(fileKey + (i + 1));
            outputStream = convertFile.getOutputStream();
            printInfo(“attmainid:” + kmssFile.getAttMainId()
                    + " words document to html(page-" + (i + 1)
                    + “convert start).\n”);
            wordDocument.save(outputStream, saveOptions);
            printInfo(“attmainid:” + kmssFile.getAttMainId()
                    + " words document to html(page-" + (i + 1)
                    + “convert over).\n”);
            outputStream.close();
        }
        printInfo(“attmainid:” + kmssFile.getAttMainId()
                + " words document to html over.\n");
        printInfo(“attmainid:” + kmssFile.getAttMainId()
                + " words document to html success.\n");
        printInfo(“attmainid:” + kmssFile.getAttMainId()
                + " words document to html used “
                + (System.currentTimeMillis() - startTime) / 1000 + “s\n”);
    } catch (Throwable t) {
        printInfo(“attmainid:” + kmssFile.getAttMainId()
                + " words document to html failure.\n”);
        t.printStackTrace();
    } finally {
        if (inputStream != null) {
            inputStream.close();
            inputStream = null;
        }
        if (outputStream != null) {
            outputStream.close();
            outputStream = null;
        }
        wordDocument = null;
    }
}

Hi there,

Thanks for your inquiry. Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.

Moreover, please share some detail about the issue which you are facing while using Aspose.Words.

package personal.lixp.test.aspose.words;
        
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
        
import personal.lixp.test.aspose.constant.FileDir;
        
import com.aspose.words.Document;
import com.aspose.words.HtmlFixedSaveOptions;
import com.aspose.words.License;

public class MainTest {
    
    public static void main(String[] args) throws Exception {
        License wordLicense = new License();
        wordLicense.setLicense(MainTest.class.getClassLoader()
                .getResourceAsStream(
                        “personal/lixp/test/aspose/Aspose.Total.Java.lic”));
        wordPageToHTML(“2.doc”, “2.doc”);
    }
    
    private static void wordPageToHTML(String docName, String htmlName)
            throws Exception {
        Document document = new Document(FileDir.getDeskTop() + File.separator
                + docName);
        document.acceptAllRevisions();
        HtmlFixedSaveOptions saveOptions = new HtmlFixedSaveOptions();
        saveOptions.setPrettyFormat(true);
        saveOptions.setExportEmbeddedCss(true);
        saveOptions.setExportEmbeddedFonts(true);
        saveOptions.setExportEmbeddedImages(true);
        saveOptions.setExportEmbeddedSvg(true);
        saveOptions.setWarningCallback(new com.aspose.words.IWarningCallback() {
            
            @Override
            public void warning(com.aspose.words.WarningInfo warningInfo) {
                System.out
                        .println(warningInfo.getWarningType() == com.aspose.words.WarningType.FONT_SUBSTITUTION ? ("Font substitution: " + warningInfo
                                .getDescription()) : “”);
            }
        });
        int pageCount = document.getPageCount();
        File pageHtml;
        OutputStream pageHtmlOutputStream;
        for (int i = 1; i <= pageCount; i++) {
            saveOptions.setPageIndex(i);
            saveOptions.setPageCount(1);
            pageHtml = new File(FileDir.getDeskTop() + File.separator
                    + htmlName + “-” + i + “.html”);
            pageHtml.createNewFile();
            pageHtmlOutputStream = new FileOutputStream(pageHtml);
            document.save(pageHtmlOutputStream, saveOptions);
        }
    }
}

Hi there,

Thanks for sharing the detail. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12316. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Dispersed alignment cann’t be render properly!!

Hi there,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the
same issue at my side. For the sake of correction, I have logged this
problem in our issue tracking system as WORDSNET-12323. I have linked
this forum thread to the same issue and you will be notified via this
forum thread once this issue is resolved.

We apologize for your inconvenience.

java.lang.IllegalStateException: Not expected other boolex values here.
	com.aspose.words.zz7.zzv1(Unknown Source)
	com.aspose.words.zz7.zzZ(Unknown Source)
	com.aspose.words.zz6.zzZ(Unknown Source)
	com.aspose.words.zz6.zzZ(Unknown Source)
	com.aspose.words.zz6.zzZ(Unknown Source)
	com.aspose.words.zzYUL.zzX(Unknown Source)
	com.aspose.words.zzZ4B.zzSk(Unknown Source)
	com.aspose.words.zzZ4B.zzZkL(Unknown Source)
	com.aspose.words.zzZ8C.zzZ(Unknown Source)
	com.aspose.words.zzZ8C.zzZ(Unknown Source)
	com.aspose.words.zzZ8C.zzZ(Unknown Source)
	com.aspose.words.Revision.zzZ(Unknown Source)
	com.aspose.words.RevisionCollection.acceptAll(Unknown Source)

Hi there,

Thanks for your inquiry. I have converted the shared document to epub and have manged to reproduce this issue. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12434. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi there,

Thanks for your inquiry. You have attached the screenshot of input and output document. I have noticed that the document (111.doc) have same paragraph alignment issue. I have attached this new document with WORDSNET-12323. Please let us know if you are facing different issue for this document.

Regarding your second document (关于集团党委同意成立江苏区域党总支部的决定dd.doc), It seems that you are facing issue with Shape’s position. Could you please share the fonts used in this document here for testing purposes. I will investigate the issue and provide you more information on this.

I have save it with fonts!!

Hi there,

Thanks for sharing the detail. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12465. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi there,

Thanks for your inquiry. Could you please share ‘STZhongsong’, ‘SimHei’ and ‘仿宋’ fonts here for testing purposes? I will investigate the issue on my side and provide you more information.

PS: To attach these resources, please zip them and
Click ‘Reply’ button that will bring you to the ‘reply page’ and there
at the bottom you can include any attachments with that post by clicking
the ‘Add/Update’ button.

I have embbed fonts in it.

Hi there,

Thanks for sharing the detail. I have tested the scenario and have managed to reproduce the same
issues at my side. For the sake of correction, I have logged these
problems in our issue tracking system as follow:

WORDSNET-12500 : Chinese text is overlapped after conversion from Doc/Docx to HtmlFixed
WORDSNET-12501 : Chinese text is moved to next page in output HtmlFixed

I
have linked this forum thread to the same issues and you will be
notified via this forum thread once these issues are resolved. We apologize for your inconvenience.

Hi there,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12509. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-12316) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi there,

Regarding WORDSNET-12509, could you please share the font “宋体-18030” for investigation purposes?

This issue is related to WordArt text in document 关于下发《技术中心2015年市场信息收集奖励办法》的通知.doc.

I have embbed font in it!

Hi there,

Thanks for sharing the document. We will inform you via this forum thread once this issue is resolved.

Hi there,

Required font is not embedded into the document and there is no entry in
the document font table for it. It seems that MS Word doesn’t embed fonts which
are used only in WordArt.Please share the font used in WordArt for testing purposes.