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>12.9.0</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("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());
问题修复:
Spire.Office 6.10.0已发布。在本次更新中Spire.Doc支持了提取形状的替代文字内容的功能。此外,该版本还修复了大量已知的问题。详情请阅读以下内容。
该版本涵盖了最新版的Spire.Doc, Spire.PDF, Spire.XLS, Spire.Presentation, Spire.Email, Spire.DocViewer, Spire.PDFViewer, Spire.Spreadsheet, Spire.OfficeViewer, Spire.DataExport, Spire.Barcode。
新功能:
https://www.e-iceblue.cn/Downloads/Spire-Office-NET.html
新功能:
string text = shape.AlternativeText;
问题修复:
问题修复:
问题修复:
问题修复:
Spire.Doc 9.10.0已发布。本次更新支持提取形状的替代文字(Alternative Text)的内容,优化了Word转PDF以及HTML转Word的功能。此外还修复了一些加载Word文档时出现的问题。详情请阅读以下内容。
新功能:
string text = shape.AlternativeText;
问题修复:
Spire.PDF 7.10.0已发布。本次更新增强了转换PDF到图片的功能。此外,该版本还修复了打印PDF等时出现的问题。详情请阅读以下内容。
问题修复:
尊敬的新老客户:
2021年国庆将至,成都冰蓝科技有限公司全体职工在此向您致以最诚挚的祝福与问候!为落实节日期间的合作事宜,我司就国庆放假做出如下通知:
因放假给您造成的不便之处,敬请谅解。
恭祝:节日快乐,万事如意!
邮件联系方式:
Spire.Presentation6.9.5已发布。本次更新修复了获取到的图例文字颜色,以及表格单元格高度不正确的问题。详情请阅读以下内容。
问题修复:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html