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

Free Support Forum - aspose.com

Cannot open Aspose-generated word on mobile devices

Good morning,

I’m sorry if the question has been answered before but I couldn’t find anything looking through the forum.
I’m using Aspose for java v 18.6 . I have successfully managed to generate a word document that contains a series of charts (bar, line etc) using another word document (loading it into memory and then modifying it). The aspose-generated document can be opened from a OSX/Windows without any issues but it fails when I try to open it from a mobile device (running either Android or IOS). Additionally, it seems that as long as I modify the original document using aspose it cannot be opened from mobile devices. During save I only specify the format of the document (SaveFormat.DOCX).

Am I missing something on the overall configuration during save?

Thank you in advance,
Panos

@panosd,

We suggest you please upgrade to the latest version of Aspose.Words for Java i.e. 18.9 and see how it goes on your end?

We have also generated a sample DOCX file (see awjava-18.9.zip (5.1 KB)) by using the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// We call this method to start building the table.
builder.startTable();
builder.insertCell();
builder.write("Row 1, Cell 1 Content.");

// Build the second cell
builder.insertCell();
builder.write("Row 1, Cell 2 Content.");
// Call the following method to end the row and start a new row.
builder.endRow();

// Build the first cell of the second row.
builder.insertCell();
builder.write("Row 2, Cell 1 Content");

// Build the second cell.
builder.insertCell();
builder.write("Row 2, Cell 2 Content.");
builder.endRow();

// Signal that we have finished building the table.
builder.endTable();

doc.save("D:\\temp\\awjava-18.9.docx");

Do you see the same issue when opening this ‘awjava-18.9.docx’ document in your Android device? If yes, what application are you getting this problem with?

Please also ZIP and upload your input document, Aspose.Words generated output DOCX file and sample code to reproduce the same issue here for testing. We will investigate the issue on our end and provide you more information.

Hello,

Thank you for your prompt reply. I’ve managed to isolate the problem and by running this test the generated document cannot be opened by devices running IOS. This example does not seem to work on any version (neither the one I used, nor the new one).

public void testDocumentWithGraph() throws Exception {
        final Document doc = new Document();
        final DocumentBuilder builder = new DocumentBuilder(doc);
        
        builder.insertChart(ChartType.COLUMN, 432, 432);
        
        doc.save("graph.docx");
    }

Panos

@panosd,

Can you please confirm if the same issue is also observable on your end when viewing Aspose.Words generated DOCX file in Android device?

We have generated a DOCX file (see awjava-18.9-chart.zip (6.5 KB)) by using the following code:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.insertChart(ChartType.COLUMN, 432, 432);

doc.save("D:\\temp\\awjava-18.9.docx");

Do you see the same issue when opening this ‘awjava-18.9.docx’ document in your Android and iOS devices? If yes, what Android App are you getting this problem with?

Hello,

The Android issue seems to be resolved (I am able to open the file on my Android phone without any issues). However, the problem persists with IOS.

@panosd,

The default viewer of iPhone can open ‘awnet-18.9-Hello world.docx’. See ‘awnet-18.9-Hello world.jpeg’. However, the Default Viewer cannot open ‘awjava-18.9.docx’ on our end. See ‘awjava-18.9.jpeg’. iPhone-problem.zip (36.4 KB).

For the sake of any correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-17549. We will further look into the details of this problem and will keep you updated on the status of this issue. We apologize for your inconvenience.

@panosd,

We also need to know from you that which software/app you use on your end to open Aspose.Words generated DOCX files in your iOS? Is it a site or do you move document using iTunes or some other software? Thanks for your cooperation.

I used the outlook app to open the docx

@panosd,

We will keep you posted on further updates.