Spire.PDF 8.7.9已发布。该版本支持创建标签PDF 文件以及PDF/UA 文件。同时增强了PDF到SVG的转换功能。此外,还修复了应用程序在使用时间戳服务器签署 PDF 文档时抛出“System.NotSupportedException”等已知问题。详情请阅读以下内容。
新功能:
//Note:At present, in order to ensure the validity of the output tagged PDF file, it is necessary to add the valid license of Spire.PDF for .net to remove the red warning watermark.
//Spire.License.LicenseProvider.SetLicenseKey("valid license key");
//Create a pdf document
PdfDocument doc = new PdfDocument();
//Add page
doc.Pages.Add();
//Set tab order
doc.Pages[0].SetTabOrder(TabOrder.Structure);
//Create PdfTaggedContent
PdfTaggedContent taggedContent = new PdfTaggedContent(doc);
taggedContent.SetLanguage("en-US");
taggedContent.SetTitle("test");
//Set font
PdfTrueTypeFont font = new PdfTrueTypeFont(new System.Drawing.Font("Times New Roman", 10), true);
PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
//Append elements
PdfStructureElement article = taggedContent.StructureTreeRoot.AppendChildElement(PdfStandardStructTypes.Document);
PdfStructureElement paragraph1 = article.AppendChildElement(PdfStandardStructTypes.Paragraph);
PdfStructureElement span1 = paragraph1.AppendChildElement(PdfStandardStructTypes.Span);
span1.BeginMarkedContent(doc.Pages[0]);
PdfStringFormat format = new PdfStringFormat(PdfTextAlignment.Justify);
doc.Pages[0].Canvas.DrawString("Spire.PDF for .NET is a professional PDF API applied to creating, writing, editing, handling and reading PDF files.",
font, brush, new Rectangle(40, 0, 480, 80), format);
span1.EndMarkedContent(doc.Pages[0]);
PdfStructureElement paragraph2 = article.AppendChildElement(PdfStandardStructTypes.Paragraph);
paragraph2.BeginMarkedContent(doc.Pages[0]); doc.Pages[0].Canvas.DrawString("Spire.PDF for .NET can be applied to easily convert Text, Image, SVG, HTML to PDF and convert PDF to Excel with C#/VB.NET in high quality.",
font, brush, new Rectangle(40, 80, 480, 60), format);
paragraph2.EndMarkedContent(doc.Pages[0]);
PdfStructureElement figure1 = article.AppendChildElement(PdfStandardStructTypes.Figure);
//Set Alternate text
figure1.Alt = "replacement text1";
figure1.BeginMarkedContent(doc.Pages[0], null);
PdfImage image = PdfImage.FromFile(@"E-logo.png");
doc.Pages[0].Canvas.DrawImage(image, new PointF(40, 200), new SizeF(100, 100));
figure1.EndMarkedContent(doc.Pages[0]);
PdfStructureElement figure2 = article.AppendChildElement(PdfStandardStructTypes.Figure);
//Set Alternate text
figure2.Alt = "replacement text2";
figure2.BeginMarkedContent(doc.Pages[0], null);
doc.Pages[0].Canvas.DrawRectangle(PdfPens.Black, new Rectangle(300, 200, 100, 100));
figure2.EndMarkedContent(doc.Pages[0]);
//Save to file
String result = "CreateTaggedFile_result.pdf";
doc.SaveToFile(result);
doc.Close();//Note:At present, in order to ensure the validity of the output PDF/UA file, it is necessary to add the valid license of Spire.PDF for .net to remove the red warning watermark.
//Spire.License.LicenseProvider.SetLicenseKey("valid license key");
//Create a pdf document
PdfDocument doc = new PdfDocument();
//Add page
doc.Pages.Add();
//Set tab order
doc.Pages[0].SetTabOrder(TabOrder.Structure);
//Create PdfTaggedContent
PdfTaggedContent taggedContent = new PdfTaggedContent(doc);
taggedContent.SetLanguage("en-US");
taggedContent.SetTitle("test");
//Set PDF/UA1 identification
taggedContent.SetPdfUA1Identification();
//Set font
PdfTrueTypeFont font = new PdfTrueTypeFont(new System.Drawing.Font("Times New Roman", 10), true);
PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
//Append elements
PdfStructureElement article = taggedContent.StructureTreeRoot.AppendChildElement(PdfStandardStructTypes.Document);
PdfStructureElement paragraph1 = article.AppendChildElement(PdfStandardStructTypes.Paragraph);
PdfStructureElement span1 = paragraph1.AppendChildElement(PdfStandardStructTypes.Span);
span1.BeginMarkedContent(doc.Pages[0]);
PdfStringFormat format = new PdfStringFormat(PdfTextAlignment.Justify);
doc.Pages[0].Canvas.DrawString("Spire.PDF for .NET is a professional PDF API applied to creating, writing, editing, handling and reading PDF files.",
font, brush, new Rectangle(40, 0, 480, 80), format);
span1.EndMarkedContent(doc.Pages[0]);
PdfStructureElement paragraph2 = article.AppendChildElement(PdfStandardStructTypes.Paragraph);
paragraph2.BeginMarkedContent(doc.Pages[0]);
doc.Pages[0].Canvas.DrawString("Spire.PDF for .NET can be applied to easily convert Text, Image, SVG, HTML to PDF and convert PDF to Excel with C#/VB.NET in high quality.",
font, brush, new Rectangle(40, 80, 480, 60), format);
paragraph2.EndMarkedContent(doc.Pages[0]);
PdfStructureElement figure1 = article.AppendChildElement(PdfStandardStructTypes.Figure);
//Set Alternate text
figure1.Alt = "replacement text1";
figure1.BeginMarkedContent(doc.Pages[0], null);
PdfImage image = PdfImage.FromFile(@"E-logo.png");
doc.Pages[0].Canvas.DrawImage(image, new PointF(40, 200), new SizeF(100, 100));
figure1.EndMarkedContent(doc.Pages[0]);
PdfStructureElement figure2 = article.AppendChildElement(PdfStandardStructTypes.Figure);
//Set Alternate text
figure2.Alt = "replacement text2";
figure2.BeginMarkedContent(doc.Pages[0], null);
doc.Pages[0].Canvas.DrawRectangle(PdfPens.Black, new Rectangle(300, 200, 100, 100));
figure2.EndMarkedContent(doc.Pages[0]);
//Save to file
String result = "CreatePDFUAFile_result.pdf";
doc.SaveToFile(result);
doc.Close();问题修复:
Spire.Presentation for Java 7.7.3 已发布。本次更新支持转换PPT文档中的所有幻灯片到一个SVG文件以及删除 PPTM 格式文档中的宏,同时提供 isSlideSizeAutoFit() 方法以支持在克隆幻灯片时使内容自适应幻灯片尺寸。此外,本次更新还修复了一些已知问题,如转换PPT到图片,程序抛“Java heap space" 异常的问题。详情请阅读以下内容。
新功能:
Presentation presentation1 =new Presentation();
presentation1.loadFromFile(inputFile_1);
Presentation presentation2 =new Presentation();
presentation2.loadFromFile(inputFile_2);
presentation1.isSlideSizeAutoFit(true);
ILayout layout = presentation1.getSlides().get(0).getLayout();
presentation1.getSlides().append(presentation2.getSlides().get(0),layout);
presentation1.saveToFile(outputFile, FileFormat.PPTX_2013);byte[] bytes=ppt.saveToOneSVG();
try(java.io.FileOutputStream stream = new java.io.FileOutputStream(outputFile)){
stream.write(bytes);
}问题修复:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-JAVA.html
OFD 是开放版式文档(Open Fixed-layout Document )的英文缩写。OFD 文档不受设备影响,在版式、版面、字体、字号等方面与纸质文件保持完全一致。其特点使它成为严肃类电子文档发布、数字化信息传播和存档的理想文档格式。但此格式在电脑中不易被直接打开,可将 OFD 转换为 PDF 格式进行查看。Spire.PDF for Java 拥有强大的文件格式转换功能,支持将多种文件和 PDF 格式之间进行相互转换。本文将介绍通过 Java 应用程序实现 OFD 转为 PDF 的方法。以下是具体方法及步骤。
首先,您需要在 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 提供了 OfdConverter.toPdf() 方法将 OFD 转为 PDF 格式,实现格式转换仅需两行代码即可,如下:
import com.spire.pdf.conversion.OfdConverter;
public class OFDtoPDF {
public static void main(String[] args) {
//加载OFD文档
OfdConverter converter = new OfdConverter("ai创意赛.ofd");
//保存为PDF格式
converter.toPdf("结果文档.pdf");
}
}
如果您希望删除结果文档中的评估消息,或者摆脱功能限制,请该Email地址已收到反垃圾邮件插件保护。要显示它您需要在浏览器中启用JavaScript。获取有效期 30 天的临时许可证。
在 MicroSoft Word 中添加水印时,仅支持对整个页面添加一个水印效果;对于需要将水印铺满整个页面的效果则可以参考本文中的方法。本文通过使用 Spire.Doc for .NET 提供的相关属性及方法以一种比较灵活的方式实现添加多行多列(平铺)图片水印到 Word 文档。另外,如需要添加多行多列文字水印效果可以参考这篇文章。
首先,您需要将 Spire.Doc for.NET 包含的 DLL 文件作为引用添加到您的 .NET项目中。DLL 文件可以从此链接下载,也可以通过 NuGet 安装。
PM> Install-Package Spire.Doc实现多行多列图片水印效果,即在页眉处添加图片,并通过多次复制图片来模拟将水印铺满整个页面的效果,根据横向复制或者纵向复制的不同图片数量,可任意调整水印图片在页面中的分布效果。下面,是本次实现图片水印的主要代码步骤:
using Spire.Doc;
using Spire.Doc.Documents;
using Spire.Doc.Fields;
namespace MultiLinePictureWatermark
{
class Program
{
static void Main(string[] args)
{
//加载Word文档
Document doc = new Document();
doc.LoadFromFile("https://cdn.e-iceblue.cn/Sample.docx");
//遍历所有section
for (int i = 0; i < doc.Sections.Count; i++)
{
Section section = doc.Sections[i];
//获取section的页眉
HeaderFooter header = section.HeadersFooters.Header;
//添加段落到页眉
Paragraph paragraph1 = header.AddParagraph();
//加载水印图片
DocPicture picture = new DocPicture(doc);
picture.LoadImage("https://cdn.e-iceblue.cn/logo.png");
picture.TextWrappingStyle = TextWrappingStyle.Behind;
//复制图片
for (int p = 0; p < 5; p++)
{
for (int q = 0; q < 3; q++)
{
picture = (DocPicture)picture.Clone();
picture.VerticalPosition = 50 + 150 * p;
picture.HorizontalPosition = 10 + 140 * q;
paragraph1.ChildObjects.Add(picture);
}
}
}
//保存文档
doc.SaveToFile("MultiLinePictureWatermatk.docx", FileFormat.Docx2013);
}
}
}Imports Spire.Doc
Imports Spire.Doc.Documents
Imports Spire.Doc.Fields
Namespace MultiLinePictureWatermark
Class Program
Private Shared Sub Main(args As String())
'加载Word文档
Dim doc As New Document()
doc.LoadFromFile("https://cdn.e-iceblue.cn/Sample.docx")
'遍历所有section
For i As Integer = 0 To doc.Sections.Count - 1
Dim section As Section = doc.Sections(i)
'获取section的页眉
Dim header As HeaderFooter = section.HeadersFooters.Header
'添加段落到页眉
Dim paragraph1 As Paragraph = header.AddParagraph()
'加载水印图片
Dim picture As New DocPicture(doc)
picture.LoadImage("https://cdn.e-iceblue.cn/logo.png")
picture.TextWrappingStyle = TextWrappingStyle.Behind
'复制图片
For p As Integer = 0 To 4
For q As Integer = 0 To 2
picture = DirectCast(picture.Clone(), DocPicture)
picture.VerticalPosition = 50 + 150 * p
picture.HorizontalPosition = 10 + 140 * q
paragraph1.ChildObjects.Add(picture)
Next
Next
Next
'保存文档
doc.SaveToFile("MultiLinePictureWatermatk.docx", FileFormat.Docx2013)
End Sub
End Class
End Namespace
如果您希望删除结果文档中的评估消息,或者摆脱功能限制,请该Email地址已收到反垃圾邮件插件保护。要显示它您需要在浏览器中启用JavaScript。获取有效期 30 天的临时许可证。
Spire.XLS for Java 12.7.4已发布。此版本支持自定义排序,并且支持将Excel 2016定义的Chart类型转换为PDF和图片。此外,本次更新还增强了Excel 到 HTML,Excel 到 PDF的转换功能。一些已知问题也得到了修复,如添加趋势线到图表,线条样式被改变等问题。详情请阅读以下内容。
新功能:
wb.getDataSorter().getSortColumns().add(0, new String[]
{"12345","Argentina", "Area", "Chile", "Capital","USA","Ecuador","Guyana"}
); wb.getDataSorter().sort(wb.getWorksheets().get(0).getRange().get("A1:A8"));问题修复:
Spire.PDFViewer 7.7.1 已发布。该版本优化了文档加载时间,同时修复了一些已知问题,如预览文档内容空白等问题。详情请阅读以下内容。
问题修复:
Spire.Presentation 7.7.5 已发布。此版本支持创建 PowerPoint 2016 中新增的图表类型。即Waterfall,Treemap、Boxandwhisker,Histogram,Pareto,SunBurst。 该版本还提供了支持裁剪幻灯片图片的 SlidePicture.Crop() 方法,并提供了 InsertPicture(stream) 方法将图片从文件流插入到幻灯片中。详情请阅读以下内容。
新功能:
SlidePicture slidePicture = (SlidePicture)presentation.Slides[0].Shapes[0];
slidePicture.Crop(float x, float y, float width, float height);presentation.Slides[0].Shapes[0].InsertPicture(Stream stream) public void CreateWaterFall(Presentation ppt)
{
IChart chart = ppt.Slides[0].Shapes.AppendChart(ChartType.WaterFall, new RectangleF(50, 50, 500, 400), false);
chart.ChartData[0, 1].Text = "Series 1";
string[] categories = { "Category 1", "Category 2", "Category 3", "Category 4", "Category 5", "Category 6", "Category 7" };
for (int i = 0; i < categories.Length; i++)
{
chart.ChartData[i + 1, 0].Text = categories[i];
}
double[] values = { 100, 20, 50, -40, 130, -60, 70 };
for (int i = 0; i < values.Length; i++)
{
chart.ChartData[i + 1, 1].NumberValue = values[i];
}
chart.Series.SeriesLabel = chart.ChartData[0, 1, 0, 1];
chart.Categories.CategoryLabels = chart.ChartData[1, 0, categories.Length, 0];
chart.Series[0].Values = chart.ChartData[1, 1, values.Length, 1];
ChartDataPoint chartDataPoint = new ChartDataPoint(chart.Series[0]);
chartDataPoint.Index = 2;
chartDataPoint.SetAsTotal = true;
chart.Series[0].DataPoints.Add(chartDataPoint);
ChartDataPoint chartDataPoint2 = new ChartDataPoint(chart.Series[0]);
chartDataPoint2.Index = 5;
chartDataPoint2.SetAsTotal = true;
chart.Series[0].DataPoints.Add(chartDataPoint2);
chart.Series[0].ShowConnectorLines = true;
chart.Series[0].DataLabels.LabelValueVisible = true;
chart.ChartLegend.Position = ChartLegendPositionType.Right;
chart.ChartTitle.TextProperties.Text = "WaterFall";
}
public void CreateTreeMap(Presentation ppt)
{
IChart chart = ppt.Slides[0].Shapes.AppendChart(ChartType.TreeMap, new RectangleF(50, 50, 500, 400), false);
chart.ChartData[0, 3].Text = "Series 1";
string[,] categories = {{"Branch 1","Stem 1","Leaf 1"},{"Branch 1","Stem 1","Leaf 2"},{"Branch 1","Stem 1", "Leaf 3"},
{"Branch 1","Stem 2","Leaf 4"},{"Branch 1","Stem 2","Leaf 5"},{"Branch 1","Stem 2","Leaf 6"},{"Branch 1","Stem 2","Leaf 7"},
{"Branch 2","Stem 3","Leaf 8"},{"Branch 2","Stem 3","Leaf 9"},{"Branch 2","Stem 4","Leaf 10"},{"Branch 2","Stem 4","Leaf 11"},
{"Branch 2","Stem 5","Leaf 12"},{"Branch 3","Stem 5","Leaf 13"},{"Branch 3","Stem 6","Leaf 14"},{"Branch 3","Stem 6","Leaf 15"}};
for (int i = 0; i < 15; i++)
{
for (int j = 0; j < 3; j++)
chart.ChartData[i + 1, j].Text = categories[i, j];
}
double[] values = { 17, 23, 48, 22, 76, 54, 77, 26, 44, 63, 10, 15, 48, 15, 51 };
for (int i = 0; i < values.Length; i++)
{
chart.ChartData[i + 1, 3].NumberValue = values[i];
}
chart.Series.SeriesLabel = chart.ChartData[0, 3, 0, 3];
chart.Categories.CategoryLabels = chart.ChartData[1, 0, values.Length, 2];
chart.Series[0].Values = chart.ChartData[1, 3, values.Length, 3];
chart.Series[0].DataLabels.CategoryNameVisible = true;
chart.Series[0].TreeMapLabelOption = TreeMapLabelOption.Banner;
chart.ChartTitle.TextProperties.Text = "TreeMap";
chart.HasLegend = true;
chart.ChartLegend.Position = ChartLegendPositionType.Top;
}
public void CreateSunBurs(Presentation ppt)
{
IChart chart = ppt.Slides[0].Shapes.AppendChart(ChartType.SunBurst, new RectangleF(50, 50, 500, 400), false);
chart.ChartData[0, 3].Text = "Series 1";
string[,] categories = {{"Branch 1","Stem 1","Leaf 1"},{"Branch 1","Stem 1","Leaf 2"},{"Branch 1","Stem 1", "Leaf 3"},
{"Branch 1","Stem 2","Leaf 4"},{"Branch 1","Stem 2","Leaf 5"},{"Branch 1","Leaf 6",null},{"Branch 1","Leaf 7", null},
{"Branch 2","Stem 3","Leaf 8"},{"Branch 2","Leaf 9",null},{"Branch 2","Stem 4","Leaf 10"},{"Branch 2","Stem 4","Leaf 11"},
{"Branch 2","Stem 5","Leaf 12"},{"Branch 3","Stem 5","Leaf 13"},{"Branch 3","Stem 6","Leaf 14"},{"Branch 3","Leaf 15",null}};
for (int i = 0; i < 15; i++)
{
for (int j = 0; j < 3; j++)
chart.ChartData[i + 1, j].Value = categories[i, j];
}
double[] values = { 17, 23, 48, 22, 76, 54, 77, 26, 44, 63, 10, 15, 48, 15, 51 };
for (int i = 0; i < values.Length; i++)
{
chart.ChartData[i + 1, 3].NumberValue = values[i];
}
chart.Series.SeriesLabel = chart.ChartData[0, 3, 0, 3];
chart.Categories.CategoryLabels = chart.ChartData[1, 0, values.Length, 2];
chart.Series[0].Values = chart.ChartData[1, 3, values.Length, 3];
chart.Series[0].DataLabels.CategoryNameVisible = true;
chart.ChartTitle.TextProperties.Text = "SunBurst";
chart.HasLegend = true;
chart.ChartLegend.Position = ChartLegendPositionType.Top;
}
public void CreatePareto(Presentation ppt)
{
IChart chart = ppt.Slides[0].Shapes.AppendChart(ChartType.Pareto, new RectangleF(50, 50, 500, 400), false);
chart.ChartData[0, 1].Text = "Series 1";
string[] categories = { "Category 1", "Category 2", "Category 4", "Category 3", "Category 4", "Category 2", "Category 1",
"Category 1", "Category 3", "Category 2", "Category 4", "Category 2", "Category 3",
"Category 1", "Category 3", "Category 2", "Category 4", "Category 1", "Category 1",
"Category 3", "Category 2", "Category 4", "Category 1", "Category 1", "Category 3",
"Category 2", "Category 4", "Category 1"};
for (int i = 0; i < categories.Length; i++)
{
chart.ChartData[i + 1, 0].Text = categories[i];
}
double[] values = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
for (int i = 0; i < values.Length; i++)
{
chart.ChartData[i + 1, 1].NumberValue = values[i];
}
chart.Series.SeriesLabel = chart.ChartData[0, 1, 0, 1];
chart.Categories.CategoryLabels = chart.ChartData[1, 0, categories.Length, 0];
chart.Series[0].Values = chart.ChartData[1, 1, values.Length, 1];
chart.PrimaryCategoryAxis.IsBinningByCategory = true;
chart.Series[1].Line.FillFormat.FillType = FillFormatType.Solid;
chart.Series[1].Line.FillFormat.SolidFillColor.Color = Color.Red;
chart.ChartTitle.TextProperties.Text = "Pareto";
chart.HasLegend = true;
chart.ChartLegend.Position = ChartLegendPositionType.Bottom;
}
public void CreateHistogram(Presentation ppt)
{
IChart chart = ppt.Slides[0].Shapes.AppendChart(ChartType.Histogram, new RectangleF(50, 50, 500, 400), false);
chart.ChartData[0, 0].Text = "Series 1";
double[] values = { 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 8, 8, 8, 9, 9, 9, 12, 12, 13, 13, 17, 17, 17, 19,
19, 19, 25, 25, 25, 25, 25, 25, 25, 25, 29, 29, 29, 29, 32, 32, 33, 33, 35, 35, 41, 41, 44, 45, 49, 49 };
for (int i = 0; i < values.Length; i++)
{
chart.ChartData[i + 1, 1].NumberValue = values[i];
}
chart.Series.SeriesLabel = chart.ChartData[0, 0, 0, 0];
chart.Series[0].Values = chart.ChartData[1, 0, values.Length, 0];
chart.PrimaryCategoryAxis.NumberOfBins = 7;
chart.PrimaryCategoryAxis.GapWidth = 20;
chart.ChartTitle.TextProperties.Text = "Histogram";
chart.ChartLegend.Position = ChartLegendPositionType.Bottom;
}
public void CreateBoxAndWhisker(Presentation ppt)
{
IChart chart = ppt.Slides[0].Shapes.AppendChart(ChartType.BoxAndWhisker, new RectangleF(50, 50, 500, 400), false);
string[] seriesLabel = { "Series 1", "Series 2", "Series 3" };
for (int i = 0; i < seriesLabel.Length; i++)
{
chart.ChartData[0, i + 1].Text = "Series 1";
}
string[] categories = {"Category 1", "Category 1", "Category 1", "Category 1", "Category 1", "Category 1", "Category 1",
"Category 2", "Category 2", "Category 2", "Category 2", "Category 2", "Category 2",
"Category 3", "Category 3", "Category 3", "Category 3", "Category 3"};
for (int i = 0; i < categories.Length; i++)
{
chart.ChartData[i + 1, 0].Text = categories[i];
}
double[,] values = new double[18, 3]{{-7,-3,-24},{-10,1,11},{-28,-6,34},{47,2,-21},{35,17,22},{-22,15,19},{17,-11,25},
{-30,18,25},{49,22,56},{37,22,15},{-55,25,31},{14,18,22},{18,-22,36},{-45,25,-17},
{-33,18,22},{18,2,-23},{-33,-22,10},{10,19,22}};
for (int i = 0; i < seriesLabel.Length; i++)
{
for (int j = 0; j < categories.Length; j++)
{
chart.ChartData[j + 1, i + 1].NumberValue = values[j, i];
}
}
chart.Series.SeriesLabel = chart.ChartData[0, 1, 0, seriesLabel.Length];
chart.Categories.CategoryLabels = chart.ChartData[1, 0, categories.Length, 0];
chart.Series[0].Values = chart.ChartData[1, 1, categories.Length, 1];
chart.Series[1].Values = chart.ChartData[1, 2, categories.Length, 2];
chart.Series[2].Values = chart.ChartData[1, 3, categories.Length, 3];
chart.Series[0].ShowInnerPoints = false;
chart.Series[0].ShowOutlierPoints = true;
chart.Series[0].ShowMeanMarkers = true;
chart.Series[0].ShowMeanLine = true;
chart.Series[0].QuartileCalculationType = QuartileCalculation.ExclusiveMedian;
chart.Series[1].ShowInnerPoints = false;
chart.Series[1].ShowOutlierPoints = true;
chart.Series[1].ShowMeanMarkers = true;
chart.Series[1].ShowMeanLine = true;
chart.Series[1].QuartileCalculationType = QuartileCalculation.InclusiveMedian;
chart.Series[2].ShowInnerPoints = false;
chart.Series[2].ShowOutlierPoints = true;
chart.Series[2].ShowMeanMarkers = true;
chart.Series[2].ShowMeanLine = true;
chart.Series[2].QuartileCalculationType = QuartileCalculation.ExclusiveMedian;
chart.HasLegend = true;
chart.ChartTitle.TextProperties.Text = "BoxAndWhisker";
chart.ChartLegend.Position = ChartLegendPositionType.Top;
}https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html
Spire.Office for Java 7.7.1 已发布。本次更新包含一些新功能,如:Spire.Doc for Java 支持比较 Word 文件时设置比较级别;Spire.XLS for Java 支持给图表系列标记填充自定义图片。此外,很多已知问题也被成功修复。详情请阅读以下内容。
获取Spire.Office for Java 7.7.1请点击:https://www.e-iceblue.cn/Downloads/Spire-Office-JAVA.html
新功能:
Document doc1 = new Document();
doc1.loadFromFile("https://cdn.e-iceblue.cn/input1.docx");
Document doc2 = new Document();
doc2.loadFromFile("https://cdn.e-iceblue.cn/input2.docx");
doc1.compare(doc2,"user");
//setting comparison level
CompareOptions options = new CompareOptions();
options.setLevel(ComparisonLevel.Character);
doc1.saveToFile("result.docx", FileFormat.Docx_2013);问题修复:
新功能:
IShapeFill markerFill = chart.getSeries().get(0).getDataFormat().getMarkerFill();
markerFill.customPicture("pic.png");
markerFill.setTexture(...);
markerFill.SetPattern(...);
//If use pattern filling, foreground color and backgroud color are needed.
markerFill.setForeColor(...);
markerFill.setBackColor(...);Workbook workbook = new Workbook();
workbook.loadFromFile("input.uos");
workbook.saveToFile("output.uos", FileFormat.UOS);问题修复:
问题修复:
Spire.XLS 12.7.1已发布。本次更新支持在导出DataTable时,设置是否保持数据的数字格式。并且支持计算“UNICODE”公式。此外,还修复了插入公式后,公式未计算出结果等已知问题。详情请阅读以下内容。
新功能:
ExportTableOptions options = new ExportTableOptions();
options.KeepDataFormat = false;
DataTable table = sheet.ExportDataTable(1, 1, sheet.LastDataRow, sheet.LastDataColumn, options);问题修复:
Spire.XLS for Java 12.7.0 已发布。此版本支持给图表系列标记填充自定义图片。并且支持加载和保存UOS格式文档。此外,还修复了更新透视表数据不正确等已知问题。详情请阅读以下内容。
新功能:
IShapeFill markerFill = chart.getSeries().get(0).getDataFormat().getMarkerFill();
markerFill.customPicture("pic.png");
markerFill.setTexture(...);
markerFill.SetPattern(...);
//If use pattern filling, foreground color and backgroud color are needed.
markerFill.setForeColor(...);
markerFill.setBackColor(...);Workbook workbook = new Workbook();
workbook.loadFromFile("input.uos");
workbook.saveToFile("output.uos", FileFormat.UOS);问题修复: