您好,我們公司有跟貴公司購買 Aspose.Words licence。
WORD轉檔PDF後有些段落長度會變短,有些段落則會變長導致最後一個字被換到下一行。
原本下載時用的是19.2版,發生問題後,我改用20.1版,但問題依然一樣。
到貴公司 Aspose.Words live demo 轉出的PDF檔案同樣遇到相同跑版的問題。
欲轉檔的文件及轉檔後的文件及案例說明請參考我的附件。
附件.zip (425.0 KB)
附上呼叫API時的原始碼:
public static void convertDocxToPDF(ByteArrayInputStream inputStream, ByteArrayOutputStream outStream) throws Exception{
// setLicense
if (!getLicense("Aspose.Words")) {
return;
}
Document doc = new Document(inputStream);
// implements IWarningCallback
HandleDocumentWarnings callback = new HandleDocumentWarnings();
doc.setWarningCallback(callback);
doc.save(outStream, SaveFormat.PDF);
}