Spire.XLS for Java 4.3.4已发布。该版本支持了加载包含数学公式的excel文档和保存到PDF/图片/SVG/ XPS等格式,同时还支持了添加删除数字签名。此外该版本还修复了创建条件日期格式时颜色更新不正确的问题。详情请阅读以下内容。
新功能:
Workbook workbook=new Workbook();
workbook.loadFromFile("C:/sample.xlsx");
CertificateAndPrivateKey cap = new CertificateAndPrivateKey("C:/Test1.pfx","e-iceblue");
workbook.addDigitalSignature(cap, "e-iceblue",new Date());
String result="C:/result.xlsx";
workbook.saveToFile(result,ExcelVersion.Version2013);
Workbook workbook2=new Workbook();
workbook2.loadFromFile(result);
workbook2.removeAllDigitalSignatures();
String result2="C:/result2.xlsx";
workbook2.saveToFile(result2,ExcelVersion.Version2013);
问题修复:
本文介绍使用Spire.Presentation for Java来添加数字签名到PPT幻灯片,也可以检测PPT是否包含数字签名,删除PPT中已有的数字签名等。
1、添加签名
import com.spire.presentation.*;
import java.util.Date;
public class AddSignature {
public static void main(String[] args)throws Exception {
//加载PPT文档
Presentation ppt = new Presentation();
ppt.loadFromFile("test.pptx");
//添加数字签名
ppt.addDigitalSignature("cer.pfx", "123654","The Author is Mia", new Date());
//保存文档
ppt.saveToFile("AddSignature.pptx",FileFormat.PPTX_2013);
ppt.dispose();
}
}

2、检测文档是否签名
import com.spire.presentation.*;
public class VerifySignature {
public static void main(String[] args) throws Exception{
//加载用于测试的PPT文档
Presentation ppt = new Presentation();
ppt.loadFromFile("AddSignature.pptx");//已签名文档
//判定文档是否签名
boolean digitalSigned = ppt.isDigitallySigned();
if (digitalSigned == true)
{
System.out.println("已签名!");
}
else if(digitalSigned == false)
{
System.out.println("未签名,可添加签名。");
}
}
}
使用已签名文件测试时,得出如下判定结果:

3、删除签名
import com.spire.presentation.*;
public class RemoveSignature {
public static void main(String[] args) throws Exception {
//加载PPT文档
Presentation ppt = new Presentation();
ppt.loadFromFile("AddSignature.pptx");
//判定文档是否签名
boolean digitalSigned = ppt.isDigitallySigned();
if (digitalSigned == true)
{
ppt.removeAllDigitalSignatures();//移除签名
}
//保存文档
ppt.saveToFile("RemoveSignature.pptx",FileFormat.PPTX_2013);
ppt.dispose();
}
}
运行程序后,最后保存的文件不再有数字签名。
Spire.PDFViewer 6.3.2已发布。该版本支持设置缩略图的页码颜色的功能,此外还修复了加载PDF文档时出现的问题。详情请阅读以下内容。
新功能:
this.pdfDocumentThumbnail1.PageLabelColor = Color.Green;
this.pdfDocumentThumbnail1.PageLabelSelectedColor = Color.Yellow;
问题修复:
Spire.PDF 7.3.3已发布。该版本增强了PDF到图片/Word,以及转换SVG到PDF的功能。此外,该版本还修复了打印PDF时出现的问题。详情请阅读以下内容。
问题修复:
Spire.Office for Java 4.3.0已发布。本次更新带来了一些新的功能,比如Spire.Presentation for Java 优化了转换PPT到PDF的时间,新增了添加自定义路径动画的功能,还支持了添加 、检测和移除数字签名的功能。同时,该版本还修复了大量的问题。详情请阅读以下内容。
获取Spire.Office for Java 4.3.0请点击:https://www.e-iceblue.cn/Downloads/Spire-Office-JAVA.html
优化:
新功能:
Presentation ppt = new Presentation();
//Add shape
IAutoShape shape = ppt.getSlides().get(0).getShapes().appendShape(ShapeType.RECTANGLE,new Rectangle(0, 0, 200, 200));
//Add animation
AnimationEffect effect = ppt.getSlides().get(0).getTimeline().getMainSequence().addEffect(shape, AnimationEffectType.PATH_USER);
CommonBehaviorCollection common = effect.getCommonBehaviorCollection();
AnimationMotion motion = (AnimationMotion)common.get(0);
motion.setOrigin(AnimationMotionOrigin.LAYOUT);
motion.setPathEditMode(AnimationMotionPathEditMode.RELATIVE);
MotionPath moinPath = new MotionPath();
moinPath.addPathPoints(MotionCommandPathType.MOVE_TO,new Point2D.Float[]{new Point2D.Float(0,0)},MotionPathPointsType.CURVE_AUTO,true);
moinPath.addPathPoints(MotionCommandPathType.LINE_TO,new Point2D.Float[]{new Point2D.Float
(0.1f,0.1f)},MotionPathPointsType.CURVE_AUTO,true);
moinPath.addPathPoints(MotionCommandPathType.LINE_TO,new Point2D.Float[]{new Point2D.Float(-
0.1f,0.2f)},MotionPathPointsType.CURVE_AUTO,true);
moinPath.addPathPoints(MotionCommandPathType.END,new Point2D.Float[]{},MotionPathPointsType.CURVE_AUTO,true);
motion.setPath(moinPath);
ppt.saveToFile(outputFile, FileFormat.PPTX_2010);
ppt.dispose();
Presentation ppt =new Presentation();
ppt.loadFromFile(input);
//Adds digital signature
ppt.addDigitalSignature("C:/gary.pfx", "e-iceblue","Gary", new Date());
ppt.saveToFile(result,FileFormat.PPTX_2013);
//Checks if the document is signed
boolean digitalSigned = ppt2.isDigitallySigned();
if (ppt2.isDigitallySigned() == true)
{
//Removes digital signature
ppt2.removeAllDigitalSignatures();
}
问题修复:
问题修复:
Spire.Doc for Java 4.3.6已发布。该版本增强了转换Word 到PDF/HTML/Image,以及转换HTML 到 Word/PDF的功能。此外,该版本还修复了加载和保存Word文档的问题。详情请阅读以下内容。
问题修复:
该文将介绍如何使用Spire.Presentation for .NET将OpenDocument 演示文稿(.odp)另存为PDF格式。
using Spire.Presentation;
namespace odptoPDF
{
class Program
{
static void Main(string[] args)
{
//加载示例文档
Presentation presentation = new Presentation();
presentation.LoadFromFile("Sample.odp",FileFormat.ODP);
presentation.SaveToFile("OdptoPDF.pdf",FileFormat.PDF);
}
}
}
Imports Spire.Presentation
Namespace odptoPDF
Class Program
Private Shared Sub Main(ByVal args() As String)
'加载示例文档
Dim presentation As Presentation = New Presentation
presentation.LoadFromFile("Sample.odp", FileFormat.ODP)
presentation.SaveToFile("OdptoPDF.pdf", FileFormat.PDF)
End Sub
End Class
End Namespace
效果图:

OpenDocument 演示文稿文档格式,通常称为 ODP,是开放文档格式文件的文件扩展名之一,旨在用作幻灯片演示文稿的开源显示格式。有时您可能需要将 ODP 文件转换为 PDF,以确保文档的格式保持完整。在本文中,您将学习如何使用 Spire.Presentation for Java 实现此功能。
首先,您需要在 Java 程序中添加 Spire.Presentation.jar 文件作为依赖项。JAR 文件可以从此链接下载。如果您使用 Maven,则可以将以下代码添加到项目的 pom.xml 文件中,从而轻松地在应用程序中导入 JAR 文件。
<repositories>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>https://repo.e-iceblue.cn/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>e-iceblue</groupId>
<artifactId>spire.presentation</artifactId>
<version>10.11.4</version>
</dependency>
</dependencies>
Spire.Presentation for Java 拥有强大的文档转换功能,提供了直接的方法用于加载文档以及保存为目标文档格式,仅需3步即可轻松快速地将 ODP 转换为 PDF。您可以按照下面列出的步骤,实现此功能。
import com.spire.presentation.*;
public class ODPtoPDF {
public static void main(String[] args) throws Exception {
//创建一个Presentation实例
Presentation presentation = new Presentation();
//加载示例 ODP 文档
presentation.loadFromFile("示例文档.odp",FileFormat.ODP);
//将文档保存为 PDF
presentation.saveToFile("结果文档.pdf", FileFormat.PDF);
}
}
如果您希望删除结果文档中的评估消息,或者摆脱功能限制,请该Email地址已收到反垃圾邮件插件保护。要显示它您需要在浏览器中启用JavaScript。获取有效期 30 天的临时许可证。
Spire.DOC 9.3.6已发布。本次更新主要新增了在转换Word到PDF时支持了EQField的功能。详情请阅读以下内容。
新功能:
Spire.Presentation for Java 4.3.2已发布。该版本优化了转换PPT到PDF的时间,新增了添加自定义路径动画的功能,增强了转换PPTX到图片的功能。此外,版本还支持了添加 、检测和移除数字签名的功能。详情请阅读以下内容。
优化:
新功能:
Presentation ppt = new Presentation();
//Add shape
IAutoShape shape = ppt.getSlides().get(0).getShapes().appendShape(ShapeType.RECTANGLE,new Rectangle(0, 0, 200, 200));
//Add animation
AnimationEffect effect = ppt.getSlides().get(0).getTimeline().getMainSequence().addEffect(shape, AnimationEffectType.PATH_USER);
CommonBehaviorCollection common = effect.getCommonBehaviorCollection();
AnimationMotion motion = (AnimationMotion)common.get(0);
motion.setOrigin(AnimationMotionOrigin.LAYOUT);
motion.setPathEditMode(AnimationMotionPathEditMode.RELATIVE);
MotionPath moinPath = new MotionPath();
moinPath.addPathPoints(MotionCommandPathType.MOVE_TO,new Point2D.Float[]{new Point2D.Float(0,0)},MotionPathPointsType.CURVE_AUTO,true);
moinPath.addPathPoints(MotionCommandPathType.LINE_TO,new Point2D.Float[]{new Point2D.Float
(0.1f,0.1f)},MotionPathPointsType.CURVE_AUTO,true);
moinPath.addPathPoints(MotionCommandPathType.LINE_TO,new Point2D.Float[]{new Point2D.Float(-
0.1f,0.2f)},MotionPathPointsType.CURVE_AUTO,true);
moinPath.addPathPoints(MotionCommandPathType.END,new Point2D.Float[]{},MotionPathPointsType.CURVE_AUTO,true);
motion.setPath(moinPath);
ppt.saveToFile(outputFile, FileFormat.PPTX_2010);
ppt.dispose();
Presentation ppt =new Presentation();
ppt.loadFromFile(input);
//Adds digital signature
ppt.addDigitalSignature("C:/gary.pfx", "e-iceblue","Gary", new Date());
ppt.saveToFile(result,FileFormat.PPTX_2013);
//Checks if the document is signed
boolean digitalSigned = ppt2.isDigitallySigned();
if (ppt2.isDigitallySigned() == true)
{
//Removes digital signature
ppt2.removeAllDigitalSignatures();
}
问题修复:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-JAVA.html