New Hotfix for Spire.Office Version 2.11.1

Spire.Office

It's a great pleasure to announce the launch of Spire.Office Hotfix Version 2.11.1, which contains the up-to-date versions of our products: Spire.Doc, Spire.PDF, Spire.XLS, Spire.DocViewer, Spire.PDFViewer, Spire.Presentation, Spire.DataExport and Spire.Barcode.

Versions:

  • Spire.Doc v5.4.18,
  • Spire.DocViewer v1.9.1,
  • Spire.XLS v7.7.7,
  • Spire.Presentation v2.3.1,
  • Spire.PDF v3.4.6,
  • Spire.PDFViewer v2.6.2,
  • Spire.DataExport v3.5.12,
  • Spire.Barcode v1.2.5

To enjoy a better experience, please download from the following link:

http://www.e-iceblue.com/Download/download-office-for-net-now.html


Details of New features and Bug solutions:

Spire.Doc

New feature:

Add new feature to get and edit content controls (Combox, Dropdownlist, CheckBox)

Click to show full codes
static void Main(string[] args)
        {
            Document document = new Document();
            document.LoadFromFile("..\\..\\sample.docx");
            foreach(Section section in document.Sections)
            {
                foreach(Body body in section.ChildObjects)
                {
                    ModifyBody(body);
                }
            }
            document.SaveToFile("result.docx",FileFormat.Docx);
            System.Diagnostics.Process.Start("result.docx");

        }
        static void ModifyBody(Body body)
        {
            if (body == null)
                return;

            foreach (DocumentObject docObj in body.ChildObjects)
            {
                if (docObj is StructureDocumentTag)
                {
                    SDTProperties SdtProperties = (docObj as StructureDocumentTag).SDTProperties;
                    ModifySdtProperties(SdtProperties);
                }
                else if (docObj is Table)
                {
                    ModifyTable(docObj as Table);
                }
                else if (docObj is Paragraph)
                {
                    ModifyParagraph(docObj as Paragraph);
                }
            }
        }

        static void ModifyTable(Table table)
        {
            if (table == null)
                return;

            foreach (TableRow row in table.Rows)
            {
                foreach (TableCell cell in row.Cells)
                {
                    if (cell is StructureDocumentTagCell)
                    {
                        SDTProperties SdtProperties = (cell as StructureDocumentTagCell).SDTProperties;
                        ModifySdtProperties(SdtProperties);   
                    }
                    else
                    {
                        ModifyBody(cell);
                    }
                }
            }
        }

        static void ModifyParagraph(Paragraph para)
        {
            if (para == null)
                return;

            foreach (DocumentObject docObj in para.ChildObjects)
            {
                if (docObj is StructureDocumentTagInline)
                {
                    SDTProperties SdtProperties = (docObj as StructureDocumentTagInline).SDTProperties;
                    ModifySdtProperties(SdtProperties);
                }
            }
        }
        public class StructureTags
        {
            List m_tagInlines;
            public List tagInlines
            {
                get
                {
                    if (m_tagInlines == null)
                        m_tagInlines = new List();
                    return m_tagInlines;
                }
                set
                {
                    m_tagInlines = value;
                }
            }
            List m_tags;
            public List tags
            {
                get
                {
                    if (m_tags == null)
                        m_tags = new List();
                    return m_tags;
                }
            }

            List m_sdtCell;
            public List SDTCell
            {
                get
                {
                    if (m_sdtCell == null)
                        m_sdtCell = new List();
                    return m_sdtCell;
                }
            }
        }
        static void ModifySdtProperties(SDTProperties properties)
        {
            if (properties == null)
                return;

            switch (properties.SDTType)
            {
                case SdtType.ComboBox:
                case SdtType.DropDownList:
                    {
                        SdtDropDownListBase dropDownListBase = (properties.ControlProperties as SdtDropDownListBase);
                        dropDownListBase.ListItems.SelectedValue = dropDownListBase.ListItems[1];
                        dropDownListBase.ListItems.Add(new SdtListItem("bill","apple"));
                    }
                    break;
                case SdtType.CheckBox:
                    {
                        SdtCheckBox sdtCheckBox = (properties.ControlProperties as SdtCheckBox);
                        sdtCheckBox.Checked = !sdtCheckBox.Checked;
                    }
                    break;
            }
        }

Bug Solutions:

  • Fix the issue where it failed to convert .doc to rtf.
  • Fix the issue where INCLUDEPICTURE path caused image not displayed when convert .rtf to .pdf.
  • Fix the issue that caused the content lost when converted .docx to .pdf.
  • Resolve the issue that caused the exception "the width for height of a square {X=0, Y=0, Width=0, Height=0} can't be 0 (null)" when convert .doc to .pdf.
  • Address the issue that caused the content disorder when converted .doc to .rtf.
  • Fix the issue caused the empty merge fields in resulted document not be cleaned when mail merge.
  • Fix the issue where the document printed incorrectly when changed display screen fonts to larger than normal.
  • Fix the issue where generated word document couldn't be opened when apply TextWrappingStyle.Through option to image.
  • Fix the issue where the image wasn't merged when used path.

Spire.PDF

Bug solutions:

  • Fix the issue where the text alignment was incorrect when load .rtf to .pdf.
  • Fix the issue caused the page repeat or lost when convert XPS to PDF.
  • Fix the issue where the content was lost when convert XPS to PDF.
  • Fix the issue caused out of memory when convert XPS to PDF.
  • Fix the issue caused slow conversion and not keep embedded images when convert PDF to image.
  • Fix the issue where the picture mark was lost when convert PDF to image.
  • Reduce the time consumption when create and merge PDF files.
  • Fix the issue caused the blank result when print PDF.
  • Fix the issue where the annotation created by Adobe couldn't be deleted.
  • Fix the issue where second header row font style got overridden by body font style when set different fonts for each header in grid.
  • Fix the issue caused blank space between some characters when extract text from PDF.

Spire.Presentation

Bug solutions:

  • Fix the issue that caused the project not to be run after compiled when converted .ppt slide to image.
  • Fix the issue where the series in charts didn't get proper indexes.