aspose.words 处理word转PDF

处理如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import com.aspose.words.Document;
import com.aspose.words.SaveFormat;
import com.platform.custom.util.res.Path;
 
public class WordToPdf {
 
    public void execute(String docFileName, String toFileName) {
        Document doc;
        try {
            doc = new Document(Path.UPLOAD_FILES+"/"+docFileName);
            doc.save(Path.ANNOUNCE_PDF_FILES+"/"+toFileName, SaveFormat.PDF);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
 
}

  

posted @   雪卜  阅读(1763)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示