Spire.Presentation 6.10.2已发布。本次更新的版本支持获取超链接的目标幻灯片,此外还增强了转换Shape到图片的功能,并修复了一些已知问题。详情请阅读以下内容。
新功能:
Presentation ppt = new Presentation();
ppt.LoadFromFile(inputFile);
IAutoShape shape = ppt.Slides[1].Shapes[0] as IAutoShape;
if (shape.Click.ActionType == HyperlinkActionType.GotoSlide)
{
ISlide targetSlide = shape.Click.TargetSlide;
Console.WriteLine("index = " + targetSlide.SlideNumber);
}
问题修复:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html
Spire.Doc 9.10.9已发布。本次更新增强了转换Word到PDF的功能,并且还修复了加载HTML和Word文档等时出现的问题。详情请阅读以下内容。
问题修复:
Spire.Office for Java 4.10.5已发布。本次更新带来了一些新的功能,比如:Spire.XLS for Java支持设置迷你图的标记颜色,以及转换Excel到图片时保留批注;Spire.Doc for Java支持了加载和保存.wps/.wpt格式的文档;Spire.Presentation for Java增强了转换PPT文档到图片的功能。此外还修复了其它一些已知问题,详情请阅读以下内容。
获取Spire.Office for Java 4.10.5请点击:https://www.e-iceblue.cn/Downloads/Spire-Office-JAVA.html
新功能:
Workbook book = new Workbook();
book.loadFromFile("D:/SparkLine.xlsx");
Worksheet worksheet = book.getWorksheets().get(0);
SparklineGroupCollection sparklineGroup = worksheet.getSparklineGroups();
sparklineGroup.get(1).setMarkersColor(Color.YELLOW);
book.saveToFile("D:/result.xlsx", FileFormat.Version2016);
worksheet.getPageSetup().setPrintComments(PrintCommentType.InPlace);
Workbook workbook = new Workbook();
workbook.loadFromFile(inputFile);
workbook.saveToFile(etFile, FileFormat.ET);
workbook.saveToFile(ettFile, FileFormat.ETT);
问题修复:
新功能:
Document document = new Document();
document.loadFromFile(inputFile, FileFormat.WPS);
//document.loadFromFile(inputFile, FileFormat.WPT);
document.saveToFile(outputFile, FileFormat.WPS);
//document.saveToFile(outputFile, FileFormat.WPT);
问题修复:
问题修复:
Spire.XLS for Java 4.10.1已发布。本次更新之后成功支持支持设置迷你图的标记颜色,以及转换Excel到图片时保留批注的新功能。此外,该版本还增强了转换Excel到HTML/PDF的功能,同时还修复了添加超链接等时出现的问题。详情请阅读以下内容。
新功能:
Workbook book = new Workbook();
book.loadFromFile("D:/SparkLine.xlsx");
Worksheet worksheet = book.getWorksheets().get(0);
SparklineGroupCollection sparklineGroup = worksheet.getSparklineGroups();
sparklineGroup.get(1).setMarkersColor(Color.YELLOW);
book.saveToFile("D:/result.xlsx", FileFormat.Version2016);
worksheet.getPageSetup().setPrintComments(PrintCommentType.InPlace);
Workbook workbook = new Workbook();
workbook.loadFromFile(inputFile);
workbook.saveToFile(etFile, FileFormat.ET);
workbook.saveToFile(ettFile, FileFormat.ETT);
问题修复:
Spire.XLS 11.10.4已发布。本次更新增强了转换XLS到PDF的功能。此外,该版本还修复了加载Excel文档程序抛出异常等问题。详情请阅读以下内容。
问题修复:
Spire.Doc for Java 4.10.3已发布。本次更新支持了加载和保存.wps/.wpt格式的文档,增强了转换Word到PDF,转换Word到HTML的功能。此外,该版本还修复了加载文档及合并文档抛异常等问题。详情请阅读以下内容。
新功能:
Document document = new Document();
document.loadFromFile(inputFile, FileFormat.WPS);
//document.loadFromFile(inputFile, FileFormat.WPT);
document.saveToFile(outputFile, FileFormat.WPS);
//document.saveToFile(outputFile, FileFormat.WPT);
问题修复:
Spire.Presentation for Java 4.10.1已发布。本次更新增强了转换PPT文档到图片的功能。此外,该版本还修复了加载PPT文档时抛出的问题。
问题修复:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-JAVA.html
OFD,即 Open Fixed-layout Document,是一种符合国家标准、属于中国的自主文件格式,在某些行业或企业中有着比较严格的使用规范。在现有的常用文件格式中,可以通过文件格式转换的方式来获得 OFD 格式,本文将通过使用 Spire.PDF for Java 展示如何实现由 PDF 到 OFD 的转换。
首先,您需要在 Java 程序中添加 Spire.Pdf.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.pdf</artifactId>
<version>11.11.11</version>
</dependency>
</dependencies>
Spire.PDF for Java 提供了 PdfDocument.saveToFile(String fileName, FileFormat fileFormat) 方法可将 PDF 文件保存到指定路径下的 OFD。下面是实现转换的代码步骤:
import com.spire.pdf.*;
public class PDFtoOFD {
public static void main(String[] args) {
//实例化PdfDocument类的对象
PdfDocument pdf = new PdfDocument();
//加载PDF文档
pdf.loadFromFile("http://cdn.e-iceblue.cn/inputfile.pdf");
//保存为OFD格式
pdf.saveToFile("ToOFD.ofd",FileFormat.OFD);
}
}
如果您希望删除结果文档中的评估消息,或者摆脱功能限制,请 该Email地址已收到反垃圾邮件插件保护。要显示它您需要在浏览器中启用JavaScript。 获取有效期30天的临时许可证。
Spire.PDF for Java 4.10.2 已发布。本次更新支持了从PDF中提取表格的新功能,增强了转换PDF到Excel/PDFA2A的功能。此外,该版本还修复了无法删除keyword属性的值等问题。详情请阅以下内容。
新功能:
PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(inputFile);
StringBuilder builder = new StringBuilder();
//抽取表格
PdfTableExtractor extractor = new PdfTableExtractor(pdf);
PdfTable[] tableLists = null;
for (int pageIndex = 0; pageIndex < pdf.getPages().getCount(); pageIndex++) {
tableLists = extractor.extractTable(pageIndex);
if (tableLists != null && tableLists.length > 0) {
for (PdfTable table : tableLists) {
int row = table.getRowCount();
int column = table.getColumnCount();
for (int i = 0; i < row; i++) {
for (int j = 0; j < column; j++) {
if (j == 0) {
builder.append(table.getText(i, j));
} else {
String text = table.getText(i, j);
builder.append(text + " ");
}
}
builder.append("\r\n");
}
}
}
}
FileWriter fileWriter = new FileWriter(outputFile);
fileWriter.write(builder.toString());
fileWriter.flush();
fileWriter.close();
问题修复:
Spire.PDF 7.10.4已发布。本次更新带来了一些新功能,比如:支持了转换PDF到Doc/Docx时设置文档属性的功能;支持了创建折线类型的注释;支持了提取表格的功能。此外,该版本修复了将SVG文件添加到PDF中,内容显示不正确等已知问题。详情请阅读以下内容。
新功能:
Spire.Pdf.Conversion.PdfToDocConverter doc = new Spire.Pdf.Conversion.PdfToDocConverter(inputFile);
doc.DocxOptions.Title = "PDFTODOCX";
doc.DocxOptions.Subject = "Set document properties.";
doc.DocxOptions.Tags = "Test Tags";
doc.DocxOptions.Categories = "PDF";
doc.DocxOptions.Commments = "This document just for testing the properties";
doc.DocxOptions.Authors = "TEST";
doc.DocxOptions.LastSavedBy = "/E-iceblue";
doc.DocxOptions.Revision = (int)7.9;
doc.DocxOptions.Version = "csharp V4.0";
doc.DocxOptions.ProgramName = "Spire.Pdf for .NET";
doc.DocxOptions.Company = "冰蓝科技";
doc.DocxOptions.Manager = "测试"
doc.SaveToDocx(outputFile);
PdfDocument pdf = new PdfDocument();
PdfPageBase page = pdf.Pages.Add();
PdfPolyLineAnnotation polyline = new PdfPolyLineAnnotation(page, new PointF[] { new PointF(0, 60),
new PointF(30, 45), new PointF(60, 90), new PointF(90, 80) });
polyline.Color = Color.PaleVioletRed;
polyline.Text = "This is a polygon annotation";
polyline.Author = "E-ICEBLUE";
polyline.Subject = "polygon annotation demo";
polyline.Name = "Summer";
polyline.Border = new PdfAnnotationBorder(1f);
polyline.ModifiedDate = DateTime.Now;
page.AnnotationsWidget.Add(polyline);
pdf.SaveToFile(output);
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile(inputPath);
StringBuilder builder = new StringBuilder();
//抽取表格
PdfTableExtractor extractor = new PdfTableExtractor(pdf);
PdfTable[] tableLists = null;
for (int pageIndex = 0; pageIndex < pdf.Pages.Count; pageIndex++)
{
tableLists = extractor.ExtractTable(pageIndex);
if (tableLists != null && tableLists.Length > 0)
{
foreach (PdfTable table in tableLists)
{
int row = table.GetRowCount();
int column = table.GetColumnCount();
for (int i = 0; i < row; i++)
{
for (int j = 0; j < column; j++)
{
string text = table.GetText(i, j);
builder.Append(text + " ");
}
builder.Append("\r\n");
}
}
}
}
File.WriteAllText(outputFile, builder.ToString());
问题修复: