转换代码
- Code: Select all
final PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(src);
pdf.saveToFile(dst, com.spire.pdf.FileFormat.DOCX);
转换文件,见附件
转换结果:大小为0的Word文件,以及以下日志
- Code: Select all
...
class com.spire.office.packages.sprnfma: Index is less than 0 or more than or equal to the list count.
Parameter name: index
Actual value was 4.
com.spire.ms.System.Collections.ArrayList.spr•⌼(wic:2661)
com.spire.ms.System.Collections.ArrayList.get_Item(wic:1598)
com.spire.ms.System.Collections.ArrayList.get(wic:3119)
com.spire.office.packages.sprtoz.spr“≋—(Unknown Source)
com.spire.office.packages.sproyy.spr▅∮—(Unknown Source)
com.spire.office.packages.sprhvy.spr┾∬—(Unknown Source)
com.spire.office.packages.sprvcz.spr┾∬—(Unknown Source)
com.spire.office.packages.sprpvy.spr™∭—(Unknown Source)
com.spire.office.packages.sprunz.spr╸≃—(Unknown Source)
com.spire.office.packages.sprloz.spr╸≃—(Unknown Source)
com.spire.office.packages.sprspea.spr┧┕—(Unknown Source)
com.spire.office.packages.sprspea.spr┩┕—(Unknown Source)
com.spire.office.packages.sprspea.spr╺┘—(Unknown Source)
com.spire.pdf.PdfDocumentBase.spr※⅟(Unknown Source)
com.spire.pdf.PdfDocumentBase.save(Unknown Source)
com.spire.pdf.PdfDocument.saveToFile(Unknown Source)
com.plumpdf.core.service.SpireProcessService.convertPdfToDocx(SpireProcessService.java:81)
com.plumpdf.core.service.SpireProcessService.main(SpireProcessService.java:432)
at com.spire.ms.System.Collections.ArrayList.spr•⌼(wic:2661)
at com.spire.ms.System.Collections.ArrayList.get_Item(wic:1598)
at com.spire.ms.System.Collections.ArrayList.get(wic:3119)
at com.spire.office.packages.sprtoz.spr“≋—(Unknown Source)
at com.spire.office.packages.sproyy.spr▅∮—(Unknown Source)
at com.spire.office.packages.sprhvy.spr┾∬—(Unknown Source)
at com.spire.office.packages.sprvcz.spr┾∬—(Unknown Source)
at com.spire.office.packages.sprpvy.spr™∭—(Unknown Source)
at com.spire.office.packages.sprunz.spr╸≃—(Unknown Source)
at com.spire.office.packages.sprloz.spr╸≃—(Unknown Source)
at com.spire.office.packages.sprspea.spr┧┕—(Unknown Source)
at com.spire.office.packages.sprspea.spr┩┕—(Unknown Source)
at com.spire.office.packages.sprspea.spr╺┘—(Unknown Source)
at com.spire.pdf.PdfDocumentBase.spr※⅟(Unknown Source)
at com.spire.pdf.PdfDocumentBase.save(Unknown Source)
at com.spire.pdf.PdfDocument.saveToFile(Unknown Source)
at com.plumpdf.core.service.SpireProcessService.convertPdfToDocx(SpireProcessService.java:81)
at com.plumpdf.core.service.SpireProcessService.main(SpireProcessService.java:432)