为有中文需求的客户提供多渠道中文技术支持.

Wed Apr 06, 2022 9:08 am

环境 macOS Monterey 12.1 或 Ubuntu 20.04.3 LTS

转换代码

Code: Select all
final PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(src);
pdf.saveToFile(dst, com.spire.pdf.FileFormat.DOCX);


转换文件,附件过大,QQ发送

转换结果:

Code: Select all
Exception in thread "main" java.lang.NumberFormatException: For input string: "Mon "
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.base/java.lang.Integer.parseInt(Integer.java:652)
        at java.base/java.lang.Integer.parseInt(Integer.java:770)
        at com.spire.office.packages.sprvoea.spr╹︻(Unknown Source)
        at com.spire.pdf.primitives.PdfDictionary.getDateTime(Unknown Source)
        at com.spire.pdf.PdfDocumentInformation.spr‘┖—(Unknown Source)
        at com.spire.pdf.PdfDocumentInformation.getCreationDate(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.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)

cococolin
 
Posts: 16
Joined: Wed Jan 12, 2022 6:50 am

Wed Apr 06, 2022 9:27 am

有另外一个文件有类似的NFE错误,见附件

Code: Select all
Exception in thread "main" java.lang.NumberFormatException: For input string: "02/2"
        at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.base/java.lang.Integer.parseInt(Integer.java:652)
        at java.base/java.lang.Integer.parseInt(Integer.java:770)
        at com.spire.office.packages.sprvoea.spr╹︻(Unknown Source)
        at com.spire.pdf.primitives.PdfDictionary.getDateTime(Unknown Source)
        at com.spire.pdf.PdfDocumentInformation.spr‘┖—(Unknown Source)
        at com.spire.pdf.PdfDocumentInformation.getCreationDate(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.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)

cococolin
 
Posts: 16
Joined: Wed Jan 12, 2022 6:50 am

Wed Apr 06, 2022 10:25 am

您好,

我测试了您的两个PDF文件,并且都复现了您提到的问题。我已将这两个问题提交给我们的开发团队,问题编号分别为SPIREPDF-5042和SPIREPDF-5043,我们的开发人员将调查并修复它们。一旦有任何更新,我会及时通知你的。

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Wed Apr 27, 2022 10:09 am

您好,

感谢您的耐心等待。
我们刚刚发布了Spire.Office for Java Version:5.4.5,解决了您之前提出的问题SPIREPDF-5042和SPIREPDF-5043。欢迎下载此版本并测试。

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to 中文技术支持