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

Sat Jun 25, 2022 4:08 am

运行环境:Mac、centos
JDK:1.8
jar包:
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.office.free</artifactId>
<version>5.3.1</version>
</dependency>
异常:
Exception in thread "main" com.spire.office.packages.sprwala: Neutral cultures cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture
at com.spire.office.packages.sprozja.spr©┦—(trf:234)
at com.spire.office.packages.sprnly.spr┘↡—(Unknown Source)
at com.spire.office.packages.sprnly.spr┽↡—(Unknown Source)
at com.spire.office.packages.sprjpea.spr〧└—(Unknown Source)
at com.spire.office.packages.sprjpea.spr◐┓—(Unknown Source)
at com.spire.pdf.PdfDocumentBase.spr╇⅝(Unknown Source)
at com.spire.pdf.PdfDocumentBase.spr━⅝(Unknown Source)
at com.spire.pdf.PdfDocument.spr¬┖—(Unknown Source)
at com.spire.pdf.PdfDocument.saveAsImage(Unknown Source)

champion.zone
 
Posts: 5
Joined: Sat Jun 25, 2022 4:02 am

Mon Jun 27, 2022 7:03 am

您好,

建议您使用下面的代码设置Locale试试:
Code: Select all
Locale newLocale = Locale.ROOT;
Locale.setDefault(newLocale);

另外,您可以试用我们的商业版(Spire.Office for Java版本: 7.6.4),因为它比免费版包含的修复和新功能都更多,会更稳定。如果问题仍然存在,请提供您的测试文档以及你mac和centos的系统详细信息供我们进一步调查,您可以将信息附在这里,或者通过邮箱(support@-eiceblue.com)发送给我们。提前谢谢。

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Wed Jun 29, 2022 8:30 am

加上后不报错了,但是转换的图片边框有白的,不知道什么原因。

PdfDocument pdfDocument = new PdfDocument();
pdfDocument.loadFromFile(pdfFilePath);
Locale newLocale = Locale.ROOT;
Locale.setDefault(newLocale);
BufferedImage bufferedImage = pdfDocument.saveAsImage(0, PdfImageType.Bitmap);
File outputfile = new File(imgFilePath);
//将图片保存为png格式
ImageIO.write(bufferedImage, "PNG", outputfile);
pdfDocument.close();

champion.zone
 
Posts: 5
Joined: Sat Jun 25, 2022 4:02 am

Thu Jun 30, 2022 6:42 am

您好,

感谢您的反馈。
我模拟了一个PDF文档并做了初步测试,但是没有复现您的问题。请提供您的PDF测试文档供我们进一步调查。您可以把文档附在这里或者通过邮箱(support@e-iceblue.com)发送给我们。提前谢谢。

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Sat Jul 02, 2022 6:51 am

pdf文件已发送,谢谢回复

champion.zone
 
Posts: 5
Joined: Sat Jun 25, 2022 4:02 am

Mon Jul 04, 2022 9:37 am

您好,

感谢您的回复。
我已将此问题提交给研发部门进行调查,问题编号为SPIREPDF-5323, 如果有任何进展我会及时反馈到您的。

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Mon Jul 11, 2022 7:39 am

请问下,这个问题有进展了吗?

champion.zone
 
Posts: 5
Joined: Sat Jun 25, 2022 4:02 am

Mon Jul 11, 2022 8:17 am

您好,

感谢您的跟进。
您的问题目前没有更新。我已经催促我们的开发团队,他们会加快寻找解决方案。如果有任何有意义的进展,我会立即让你知道。谢谢您的理解。

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Thu May 25, 2023 7:33 am

您好,

感谢您的耐心等待。
很高兴通知您,我们发布的新版本Spire.Office for java 8.5.6,修复了您提出的问题SPIREPDF-5323,您可以通过以下链接下载然后进行测试:
官网链接:https://www.e-iceblue.cn/Downloads/Spire-Office-JAVA.html
Maven:
Code: Select all
   
<repositories>
    <repository>
        <id>com.e-iceblue</id>
        <name>e-iceblue</name>
        <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.office</artifactId>
        <version>8.5.6</version>
    </dependency>
</dependencies>



Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to 中文技术支持