Spire.Email 4.11.1已发布。该版本修复了将PST文件中提取的电子邮件保存为eml格式时,发件人不正确的问题。详情请阅读以下内容。
问题修复:
Spire.Presentation for Java 4.11.4已发布。本次更新增强了PPT到HTML的转换功能,修复了无法获取幻灯片形状的问题。详情请阅读以下内容。
问题修复:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-JAVA.html
将带有彩色图像的 PDF 转换为灰度可以帮助您减小文件大小,打印时无需消耗彩色墨水,从而节约打印成本。本篇文章将介绍如何使用 Spire.PDF for .NET 在 C# 和 VB.NET 中以编程的方式实现该转换。
首先,您需要添加 Spire.PDF for .NET 包中包含的 DLL 文件作为 .NET 项目中的引用。DLL 文件可以从 此链接 下载或通过 NuGet 安装。
PM> Install-Package Spire.PDF下面是将彩色PDF转换为灰度的步骤:
using Spire.Pdf.Conversion;
namespace ConvertPdfToGrayscale
{
class Program
{
static void Main(string[] args)
{
//创建一个PdfGrayConverter实例并加载文档
PdfGrayConverter converter = new PdfGrayConverter(@"Sample.pdf");
//将彩色PDF转换为灰度
converter.ToGrayPdf("Grayscale.pdf");
converter.Dispose();
}
}
}
Imports Spire.Pdf.Conversion
Namespace ConvertPdfToGrayscale
Friend Class Program
Private Shared Sub Main(ByVal args As String())
'创建一个PdfGrayConverter实例并加载文档
Dim converter As PdfGrayConverter = New PdfGrayConverter("Sample.pdf")
'将彩色PDF转换为灰度
converter.ToGrayPdf("Grayscale.pdf")
converter.Dispose()
End Sub
End Class
End Namespace原文档:

结果文档:

如果您希望删除结果文档中的评估消息,或者摆脱功能限制,请 该Email地址已收到反垃圾邮件插件保护。要显示它您需要在浏览器中启用JavaScript。 获取有效期 30 天的临时许可证。
Spire.Presentation 6.11.2已发布。本次更新支持获取表格单元格的填充颜色的功能,同时也支持设置图表数据标签的数据源的功能。此外,该版本还增强了转换PowerPoint到图片的功能,并且还修复了插入圆柱体等时出现的问题。详情请阅读以下内容。
新功能:
table.TableRows[i][j].DisplayColor;
Presentation ppt = new Presentation();
IChart chart = ppt.Slides[0].Shapes.AppendChart(ChartType.ColumnStacked, new RectangleF(100, 100, 500, 400));
CellRange cellRange = chart.ChartData["F1"];
cellRange.Text = "aaa";
cellRange = chart.ChartData["F2"];
cellRange.Text = "bbb";
cellRange = chart.ChartData["F3"];
cellRange.Text = "ccc";
cellRange = chart.ChartData["F4"];
cellRange.Text = "ddd";
chart.Series[0].DataLabelRanges = chart.ChartData["F1", "F4"];
ChartDataLabel dataLabel1 = chart.Series[0].DataLabels.Add();
dataLabel1.ID = 0;
dataLabel1.LabelValueVisible = true;
dataLabel1.ShowDataLabelsRange = true;
foreach (AnimationEffect effect in shape.Slide.Timeline.MainSequence)
{
if (effect.ShapeTarget.Equals(shape as Spire.Presentation.Shape))
{
MotionPath path = ((AnimationMotion)effect.CommonBehaviorCollection[0]).Path;
foreach (MotionCmdPath motionCmdPath in path)
{
PointF[] points = motionCmdPath.Points;
MotionCommandPathType type = motionCmdPath.CommandType;
}
}
}
Image image = shape.SaveAsImage();
问题修复:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html
Spire.Doc 9.11.5已发布。该版本新增了SetColumnWidth方法设置表格列宽,以及新增UseNewEngine方法使用新引擎转换Word到PDF。此外还优化了调整设置表格单元格宽度的方法。详情请阅读以下内容。
新功能:
table.SetColumnWidth(int columnIndex, float columnWidth, CellWidthType columnWidthType);
Document doc = new Document();
doc.LoadFromFile("input.docx");
doc.UseNewEngine = true;
doc.SaveToFile("result.pdf", FileFormat.PDF);
问题修复:
//Old method
//tableCell.Width //Deprecated
//tableCell.CellWidthType //Deprecated
//New method
tableCell.SetCellWidth(float width, CellWidthType widthType);
Spire.Doc for Java 4.11.3已发布。本次更新增强了转换Word到PDF/图片/HTML,以及转换HTML到Word的功能。此外,该版本还修复了比较Word文档等时出现的问题。详情请阅读以下内容。
问题修复:
Spire.PDF 7.11.1已发布。本次更新支持转线性化PDF的功能。此外,该版本增强了PDF到图片的转换功能,还修复了一些已知的问题。详情请阅读以下内容。
新功能:
PdfToLinearizedPdfConverter converter = new PdfToLinearizedPdfConverter("inputFile");
converter.ToLinearizedPdf("outputFile");
问题修复:
散点图(XY) 是一个二维图表,显示了两组变量之间的关系。每个散点图有两个轴:一个水平轴(x轴)和一个垂直轴(y轴),它只接受一个数据系列。在本文中,您将学习如何使用 Spire.Presentation for Java 向 PowerPoint 幻灯片添加散点图。
首先,您需要在 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>11.9.10</version>
</dependency>
</dependencies>
Spire.Presentation for Java 提供了 ShapeCollection.appendChart(ChartType type, Rectangle2D rectangle, boolean init) 方法向幻灯片添加特定类型的图表,ChartType 枚举预定义了多达 73 种图表类型,包括但不限于散点图、柱图、饼图等。
下面是创建散点图的具体方法和步骤:
import com.spire.presentation.FileFormat;
import com.spire.presentation.Presentation;
import com.spire.presentation.SlideSizeType;
import com.spire.presentation.TextLineStyle;
import com.spire.presentation.charts.ChartType;
import com.spire.presentation.charts.IChart;
import com.spire.presentation.charts.entity.ChartDataLabel;
import com.spire.presentation.drawing.FillFormatType;
import java.awt.*;
import java.awt.geom.Rectangle2D;
public class ScatterChart {
public static void main(String[] args) throws Exception{
//创建Presentation类的实例
Presentation presentation = new Presentation();
presentation.getSlideSize().setType(SlideSizeType.SCREEN_16_X_9);
//添加散点图表到第一张幻灯片
IChart chart = presentation.getSlides().get(0).getShapes().appendChart(ChartType.SCATTER_MARKERS,new Rectangle2D.Float(180, 80, 550, 320),false);
//设置图表标题
chart.getChartTitle().getTextProperties().setText("散点图表");
chart.getChartTitle().getTextProperties().isCentered(true);
chart.getChartTitle().setHeight(20f);
chart.hasTitle(true);
//设置图表数据源
Double[] xData = new Double[] { 1.0, 2.4, 5.0, 8.9 };
Double[] yData = new Double[] { 5.3, 15.2, 6.7, 8.0 };
chart.getChartData().get(0,0).setText("X-值");
chart.getChartData().get(0,1).setText("Y-值");
for (int i = 0; i < xData.length; i++) {
chart.getChartData().get(i+1,0).setValue(xData[i]);
chart.getChartData().get(i+1,1).setValue(yData[i]);
}
//设置系列标签
chart.getSeries().setSeriesLabel(chart.getChartData().get("B1","B1"));
//设置X和Y轴值
chart.getSeries().get(0).setXValues(chart.getChartData().get("A2","A5"));
chart.getSeries().get(0).setYValues(chart.getChartData().get("B2","B5"));
//添加数据标签
for (int i = 0; i < 4; i++)
{
ChartDataLabel dataLabel = chart.getSeries().get(0).getDataLabels().add();
dataLabel.setLabelValueVisible(true);
}
//设置主轴标题和次轴标题
chart.getPrimaryValueAxis().hasTitle(true);
chart.getPrimaryValueAxis().getTitle().getTextProperties().setText("X-轴 标题");
chart.getSecondaryValueAxis().hasTitle(true);
chart.getSecondaryValueAxis().getTitle().getTextProperties().setText("Y-轴 标题");
//设置网格线
chart.getSecondaryValueAxis().getMajorGridTextLines().setFillType(FillFormatType.SOLID);
chart.getSecondaryValueAxis().getMajorGridTextLines().setStyle(TextLineStyle.THIN_THIN);
chart.getSecondaryValueAxis().getMajorGridTextLines().getSolidFillColor().setColor(Color.GRAY);
chart.getPrimaryValueAxis().getMajorGridTextLines().setFillType(FillFormatType.NONE);
//设置数据点线
chart.getSeries().get(0).getLine().setFillType(FillFormatType.SOLID);
chart.getSeries().get(0).getLine().setWidth(0.1f);
chart.getSeries().get(0).getLine().getSolidFillColor().setColor(Color.BLUE);
//保存文档
presentation.saveToFile("ScatterChart.pptx", FileFormat.PPTX_2013);
presentation.dispose();
}
}
如果您希望删除结果文档中的评估消息,或者摆脱功能限制,请 该Email地址已收到反垃圾邮件插件保护。要显示它您需要在浏览器中启用JavaScript。 获取有效期 30 天的临时许可证。
Spire.XLS for Java 4.11.0已发布。本次更新支持获取Excel文件的创建时间和最后保存时间,并增强Excel到PDF的转换功能。此外,该版本还修复了一些已知的问题。详情请阅读以下内容。
新功能:
BuiltInDocumentProperties properties1 = workbook.getDocumentProperties();
properties1.getCreatedTime();
properties1.getLastSaveTime();
问题修复:
Spire.PDF for Java 4.11.1已发布。本次更新支持转换PDF到透明背景图片的功能,并增强了转换PDF到Word的功能。此外,该版本还修复了对单元格设置不换行不起作用的问题。详情请阅读以下内容。
新功能:
PdfDocument doc = new PdfDocument();
doc.loadFromFile("input.pdf");
doc.getConvertOptions().setPdfToImageOptions(0);
BufferedImage image = doc.saveAsImage(0);
问题修复: