简体   繁体   English

使用Aspose在Java中从pdf转换为word时不显示图表

[英]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. 我决定将excel转换为word,但是,有人建议我必须将exccel转换为pdf,此后,我将pdf转换为word,但是Excel的图表正确显示在pdf中,不幸的是,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 这是我的优势: https : //ufile.io/8wruc

@Saeed Aliakbari, I have executed your code to convert the source Excel to PDF, and then PDF to DOCX with Aspose.Cells for Java 17.6 and Aspose.Pdf for Java 17.6 APIs. @Saeed Aliakbari,我已经执行了代码,以使用Java 17.6的Aspose.Cells和Java 17.6 API的Aspose.Pdf将源Excel转换为PDF,然后将PDF转换为DOCX。 We could not find the missing chart in the output DOCX file. 我们在输出DOCX文件中找不到丢失的图表。 This is the output DOCX file: Output Word document of Aspose.Pdf for Java 17.6 . 这是输出DOCX文件: Aspose.Pdf for Java 17.6的输出Word文档 You can highlight the issue with a snapshot and also let me know the problematic page number. 您可以用快照突出显示问题,也可以让我知道有问题的页码。

I work with Aspose as Developer evangelist. 我与Aspose合作,担任Developer推广员。

@Saeed Aliakbari, Yes, it could be the cause of a missing chart. @Saeed Aliakbari,是的,这可能是图表丢失的原因。 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. Java API的Aspose.Pdf的试用版(未应用Aspose许可证)将插入评估水印,并且只能查看/编辑任何集合中的四个元素。 You can get a 30 day temporary license for the evaluation purposes. 您可以出于评估目的获得30天的临时许可证。 It would be a full license that lets you test every aspect of the API before buying it. 这将是一个完整的许可证,使您可以在购买前测试API的各个方面。

I work with Aspose as Developer evangelist. 我与Aspose合作,担任Developer推广员。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM