We're pleased to announce the release of Spire.Doc 13.12.2. This version supports the "Two Lines in One" function, enhancing the effect of converting Word to PDF. It also adds support for setting the "Horizontal in Vertical" property of Paragraph text, copying styles from template documents when converting Markdown to Docx, and retrieving style change revisions. Meanwhile, some issues that occurred when converting or loading Word documents have also been successfully fixed. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREDOC-5504 | Supports setting the "Horizontal in Vertical" property of Paragraph text.
Document doc = new Document();
Section section = doc.AddSection();
Spire.Doc.Documents.Paragraph paragraph = section.AddParagraph();
Spire.Doc.Fields.TextRange farEastLayout = paragraph.AppendText("test");
FarEastLayout style = new FarEastLayout();
style.Vertical = true;
farEastLayout.CharacterFormat.FarEastLayout = style;
doc.SaveToFile(outputFile, FileFormat.Docx);
doc.Close();
|
| New Feature | SPIREDOC-11073 | Supports copying styles from template documents when converting Markdown to Docx.
//Load template documents with existing styles
Document temple = new Document();
temple.LoadFromFile("temple.docx");
//Load markdown file
Document doc = new Document();
doc = new Document(@"Doc.md");
//Copy styles from template documents
doc.CopyStylesFromTemplate(temple);
//Save
doc.SaveToFile(@"Doc.docx", Spire.Doc.FileFormat.Docx2016);
|
| New Feature | – | Supports the "Two Lines in One" function to enhance Word to PDF conversion. |
| New Feature | – | Supports retrieving style change revisions.
Document doc = new Document();
doc.LoadFromFile(inputFile);
RevisionInfoCollection revisionInfoCollection = doc.GetRevisionInfos();
StringBuilder sb = new StringBuilder();
foreach (RevisionInfo revisionInfo in revisionInfoCollection)
{
if (revisionInfo.RevisionType == RevisionType.FormatChange)
{
if (revisionInfo.OwnerObject is Spire.Doc.Fields.TextRange)
{
TextRange range = (TextRange)revisionInfo.OwnerObject;
sb.AppendLine("TextRange:" + range.Text + "\r\n");
doc.RevisionsView = RevisionsView.Original;
sb.AppendLine("Original style:" + "isBold:" + range.CharacterFormat.Bold + ";" + "TextColor:" + range.CharacterFormat.TextColor + ";HighlightColor:" + range.CharacterFormat.HighlightColor + ";FontName:" + range.CharacterFormat.FontName + ";UnderlineStyle:" + range.CharacterFormat.UnderlineStyle + "\r\n");
doc.RevisionsView = RevisionsView.Final;
sb.AppendLine("Final style:" + "isBold:" + range.CharacterFormat.Bold + ";" + "TextColor:" + range.CharacterFormat.TextColor + ";HighlightColor:" + range.CharacterFormat.HighlightColor + ";FontName:" + range.CharacterFormat.FontName + ";UnderlineStyle:" + range.CharacterFormat.UnderlineStyle + "\r\n");
}
}
}
File.WriteAllText(outputFile, sb.ToString());
doc.Close();
|
| Bug Fix | SPIREDOC-10859 | Fixed issue with incorrect header appearance when converting Word to PDF. |
| Bug Fix | SPIREDOC-11005 | Fixed issue with loss of image transparency when converting Word to PDF/A-3B. |
| Bug Fix | SPIREDOC-11579 | Fixed issue with incorrect rendering when converting Word to PDF. |
| Bug Fix | SPIREDOC-11623 | Fixed issue where converting Word to PDF threw a "System.NullReferenceException". |
| Bug Fix | SPIREDOC-11644 | Fixed issue with incorrect fonts when converting Word to images. |
| Bug Fix | SPIREDOC-11659 | Fixed issue where copying headers threw an "Object reference not set to an instance of an object" error. |
| Bug Fix | SPIREDOC-11680 | Fixed issue where loading a signed document threw a "System.FormatException" error. |
| Bug Fix | SPIREDOC-11696 | Fixed issue where the doc.HtmlUrlLoadEvent could not be used in the latest version. |
| Bug Fix | SPIREDOC-11700 | Fixed issue with incorrect page number updates in the table of contents. |
Click the link to download Spire.Doc 13.12.2:
More information of Spire.Doc new release or hotfix: