Search code examples
javaasposeaspose-cellsaspose.wordsaspose.pdf

dont show chart in convert from pdf to word in java with Aspose


I decided to convert excel to word but , I was suggested that I have to convert exccel to pdf , after this ok ,I convert pdf to word But Excel has a chart that correctly is in pdf Unfortunately, it does not come in Word.

import com.aspose.cells.FileFormatType;
import com.aspose.cells.Workbook;
import com.aspose.pdf.Document;
import com.aspose.pdf.SaveFormat;

public class Test {
    public static void main(String[] args) throws Exception {

        String dir="D:/Test/";

        Workbook workbook = new Workbook(dir+"test.xlsx");

        workbook.save(dir+"testexcel.pdf", FileFormatType.PDF);

        Document document = new Document(dir+"testexcel.pdf");

        document.save(dir+"testexcel1.docx", SaveFormat.DocX);

    }
}

this is my excel : https://ufile.io/8wruc


Solution

  • @Saeed Aliakbari, Yes, it could be the cause of a missing chart. The trail version (without applying Aspose license) of Aspose.Pdf for Java API inserts an evaluation watermark, and only four elements of any collection can be viewed/edited. You can get a 30 day temporary license for the evaluation purposes. It would be a full license that lets you test every aspect of the API before buying it.

    I work with Aspose as Developer evangelist.