常见格式转换一网打尽!国产office文档开发套包Spire.Office 2021 8月最新发布 丨附下载

Spire.Office 6.8.2已发布。本次更新带来了许多出色的新功能,比如:Spire.Presentation支持加载保存 DPS/DPT 格式的文档,支持设置PPT中图表的边框样式为直角,同时还支持设置图表坐标轴的刻度线间隔,等等,欢迎下载体验。

你在寻找支持在.NET中用编程方法处理各类格式文档的API吗巧,.NET版企业级文档管理组合套包Spire.Office 2020全新上线!Word、Excel、PPT、PDF、条形码等格式一网打尽。

目前,

新功能及问题修复详情,请参阅如下内容。

Spire.Doc

问题修复:


Spire.PDF

PdfDocument doc = new PdfDocument();doc.LoadFromFile(PdfFile);doc.SaveToFile(OfdFile, FileFormat.OFD
  • 支持给数字签名添加有效性检查标记
  • PdfDocument doc = new PdfDocument();doc.LoadFromFile(inputPath);PdfCertificate cert = new PdfCertificate(pfxPath, password);PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, cert);signatureMaker.SetAcro6Layers(false);signatureMaker.MakeSignature("signName", doc.Pages[0], 100, 100, 120, 60);doc.SaveToFile(outputPath);
  • PdfOrdinarySignatureMaker接口支持设置签名图片和签名细节
  • PdfDocument doc = new PdfDocument();doc.LoadFromFile(inputPath);PdfCertificate cert = new PdfCertificate(pfxPath, password);PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, cert);PdfSignature signature = signatureMaker.Signature;signature.Name = "E-iceblue";signature.ContactInfo = "028-81705109";signature.Location = "Chengdu";signature.Reason = "The certificate of this document";PdfSignatureAppearance appearance = new PdfSignatureAppearance(signature);appearance.NameLabel = "Signer: ";appearance.ContactInfoLabel = "ContactInfo: ";appearance.LocationLabel = "Location: ";appearance.ReasonLabel = "Reaseon: ";appearance.SignatureImage = PdfImage.FromFile(imagePath);appearance.GraphicMode = GraphicMode.SignImageAndSignDetail;signatureMaker.MakeSignature("signName", doc.Pages[0], 100, 600, 200, 100, appearance);doc.SaveToFile(outputPath);
  • 支持添加不可见的数字签名
  • PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, x509);signatureMaker.MakeSignature("signName");

    问题修复:


    Spire.Presentation

    新功能

    ppt.SaveToFile(outputPath + filename + ".dps", FileFormat.Dps);ppt.SaveToFile(outputPath + filename + ".dpt", FileFormat.Dpt);
  • 支持修改PPT中图表内趋势线方程的字体大小和位置
  • IChart chart = ppt.Slides[0].Shapes[0] as IChart;ITrendlines trendline = chart.Series[0].TrendLines[0] as ITrendlines;foreach(TextParagraph para in trendline.TrendLineLabel.TextFrameProperties.Paragraphs){    para.DefaultCharacterProperties.FontHeight = 20;    foreach(TextRange range in para.TextRanges)    {        range.FontHeight = 20;    }}trendline.TrendLineLabel.OffsetX = -0.1f;trendline.TrendLineLabel.OffsetY = 0.1f;
  • 支持设置PPT中图表的边框样式为直角
  • IChart chart = ppt.Slides[0].Shapes[0] as IChart;chart.Line.FillFormat.FillType = FillFormatType.Solid;chart.Line.FillFormat.SolidFillColor.Color = Color.Red;chart.BorderRoundedCorners = false;
  • 支持在PPT中,使用正则表达式替换文本
  • Regex regex = new Regex("^[A-Za-z]+$");string newvalue = "new string";foreach(IShape shape in ppt.Slides[0].Shapes){    shape.ReplaceTextWithRegex(regex, newvalue);}

    问题修复


    Spire.XLS

    新功能:

    Workbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet sheet = workbook.Worksheets[0];SaveShapeTypeOption shapelist = new SaveShapeTypeOption();List images = sheet.SaveShapesToImage(shapelist);int index = 0;foreach (System.Drawing.Image img in images){    img.Save("toImage" + index + ".Png", ImageFormat.Png);    index++;}
  • 支持加载保存et/ett格式的文档
  • Workbook wb = new Workbook();wb.LoadFromFile(etInputFile);//wb.LoadFromFile(ettInputFile);wb.SaveToFile(etOutputFile, FileFormat.ET);//wb.SaveToFile(ettOutputFile, FileFormat.ETT);

    问题修复:


    Spire.Barcode

    新功能:

    BarcodeInfo[] barcodeInfos = BarcodeScanner.ScanInfo(imageFile);//BarcodeInfo[] barcodeInfos = BarcodeScanner.ScanInfo(imageFile, barCodeType);for (int i = 0; i < barcodeInfos.Length; i++){    //获取条码位置    BarCodeReadType barCodeReadType = barcodeInfos[i].BarCodeReadType;    //获取条码四个顶点的坐标    Point[] vertexes = barcodeInfos[i].Vertexes;}

    问题修复:


    是E-iceblue官方友好合作伙伴,如果您对spire.office感兴趣,可以联系在线客服了解具体授权价格和使用机制。
    标签:

    来源:慧都

    声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

    上一篇 2021年7月20日
    下一篇 2021年7月20日

    相关推荐

    发表回复

    登录后才能评论