Browse our Products

Aspose.Words for .NET 22.9 Release Notes

Major Features

There are 102 improvements and fixes in this regular monthly release. The most notable are:

  • TxtLoadOptions was extended with new AutoNumberingDetection option.
  • Implemented an ability to cache the header/footer shapes to reduce the size of the output PDF file.
  • Added a new feature to get FieldEQ as OfficeMath.
  • Allowed creation of structured document tags of Group type at Row level.

Full List of Issues Covering all Changes in this Release (Reported by .NET Users)

WORDSNET-13166Implement caching of watermarks through frame xObjectsNew Feature
WORDSNET-17215Table borders are not correct in PDFNew Feature
WORDSNET-5844Custom Table border style is rendering incorrectly in Fixed Page FormatsNew Feature
WORDSNET-24126Inaccurate spacing between shape and next line text in footerNew Feature
WORDSNET-24144Allow creating SDT of Group type on Row levelNew Feature
WORDSNET-22966Add feature to render the comments according to preferred languageNew Feature
WORDSNET-16836PDF rendition differs from the source documentEnhancement
WORDSNET-15408Conversion from RTF to PDF using Words results in a squished tableEnhancement
WORDSNET-7205Cell borders are getting lost when rendering to PDFEnhancement
WORDSNET-24124Outset border type is not rendered correctly in presence of cell spacingEnhancement
WORDSNET-5288Table borders looks incorrectly after converting to PDFEnhancement
WORDSNET-24047Remove CodePorting attributes from release buildBug
WORDSNET-23903Text is overlapped after rendering SVG imageBug
WORDSNET-22945Preserve RestartPageNumbering section property during DOCX HTML roundtrip sessionBug
WORDSNET-24220InvalidOperationException is thrown upon comparing documentsBug
WORDSNET-18559DOCX to PDF conversion issue with text renderingBug
WORDSNET-23624Data label values order is changed upon renderingBug
WORDSNET-10996Add possiblity to generate PDF of Minimum Size (Publishing Online)Bug
WORDSNET-23112Spaces between images are lostBug
WORDSNET-24242NullReferenceException when saving AZW3 to streamBug
WORDSNET-23636Chart legend is cut of at the bottomBug
WORDSNET-23645Data labels values are rendered improperlyBug
WORDSNET-18373DOCX to PDF conversion issue with line wrapping in the middle of Russian wordBug
WORDSNET-22920DOCX to PDF conversion breaks words and wraps parts of words to the next lineBug
WORDSNET-18637DOCX to HTML conversion issue with background color of paragraphBug
WORDSNET-23943Abort pdf2word builds by timeoutBug
WORDSNET-20748Text moves to next line after DOCX to PDF conversionBug
WORDSNET-24251OutOfMemoryException is thrown upon importing RTF documentBug
WORDSNET-21064Fill entire DIV with lightblue background-color during HTML to Word ConversionBug
WORDSNET-20308Y-Axis labels are changed after DOCX to PDF conversionBug
WORDSNET-24177Page orientation is not preserved after DOCX HTML roundtripBug
WORDSNET-24234NullReferenceException on UpdatePageLayout on document with chartsBug
WORDSNET-24258Incorrect display of the radical character for the case of subscript as an argumentBug
WORDSNET-23962Issue with line spacing when converting odt to docxBug
WORDSNET-22229Content are lost after DOCX to PDF conversionBug
WORDSNET-24236FileCorruptedException on loading DOCX documentBug
WORDSNET-23934An image is scaled down in AW document model on reading and RTF documentBug
WORDSNET-23748Incorrect paragraph break font size in AW document model for a WML documentBug
WORDSNET-24000Text is wrapped improperly upon renderingBug
WORDSNET-24001Frame in header lost on conversion to PDFBug
WORDSNET-24008AW renders invisible text inside text boxBug
WORDSNET-24009LayoutCollectorGetStartPageIndex returns incorrect page number for shape in nested tableBug
WORDSNET-24021StackOverflowException upon loading a HTML documentBug
WORDSNET-24022Revisions are rendered in wrong placesBug
WORDSNET-23113Images with SMask bigger than original image are processed incorrectlyBug
WORDSNET-22894Frame is lost after RTF to PDF conversionBug
WORDSNET-22815Issues after Set XML MappingBug
WORDSNET-24063RTL TOC is corrupted after importing PDF documentBug
WORDSNET-24062RTL content is reversed and has spaces after importing PDFBug
WORDSNET-23833LINQ Reporting Engine always considers JSON null literals as string valuesBug
WORDSNET-24083IndexOutOfRangeException is thrown upon rendering documentBug
WORDSNET-24093Issue with conversion Word to PDFBug
WORDSNET-23858ArgumentOutOfRangeException is thrown upon conversion DOCX to HTMLBug
WORDSNET-24107Blurry text occurs aftet PDF to JPG conversion via PdfFixedRendererBug
WORDSNET-20613Word to pdf files become hundreds of times largerBug
WORDSNET-23887Caption Ref present on first para get missingBug
WORDSNET-24109Text wrapping is incorrect after renderingBug
WORDSNET-24116New style introduced after updating CXPBug
WORDSNET-24120Invalid positioning and alignment of elements when appending DOCX documentsBug
WORDSNET-24125FileCorruptedException is thrown upon loading DOCX documentBug
WORDSNET-24127Header row is duplicated when use ExtractPages methodBug
WORDSNET-24133Hidemark handling is not rightBug
WORDSNET-24140Nested bookmark is removed after setting text of outer bookmarkBug
WORDSNET-18759DOCX to PDF conversion issue with word wrappingBug
WORDSNET-24169SDT to custom XML mapping wrong list numberingBug
WORDSNET-24174Floating table position property changes on conversion to docxBug
WORDSNET-24178Exception is thrown when converting DOCX to HTMLBug
WORDSNET-24180Content moved to next page and extra page createdBug
WORDSNET-23669Header contents do not match on wml to docx conversionBug
WORDSNET-24186NullReferenceException is thrown upon rendering document with chartBug
WORDSNET-24185NullReferenceException is thrown upon getting ChildNodes from imported StructuredDocumentTagRangeStartBug
WORDSNET-24181Incorrect nodes order in AW document model for a wml documentBug
WORDSNET-24190Paragraph formatting is not the same in the output fileBug
WORDSNET-23787Incorrect page margins on wml to docx conversionBug
WORDSNET-23174IndexOutOfRangeException in LibTiff library codeBug
WORDSNET-24196IndexOutOfRangeException when converting RTF to PDFBug
WORDSNET-23030ZlibException: Bad state Unknown compression methodBug
WORDSNET-23208InvalidOperationException at PdfObjectStreamParseObjectBug
WORDSNET-24199ArgumentException because of an empty key in CustomDocumentPropertiesBug
WORDSNET-24205Tr class name cannot be used when AsposeWords is referencedBug
WORDSNET-24211Series data is not rendered on the chart areaBug
WORDSNET-24207Incorrect handling of underline text display for formulasBug
WORDSNET-24214Update links in tests and test files to use new wikiBug
WORDSNET-24218Embedded SVG fragments are indented incorrectly when saved with PrettyFormat enabledBug
WORDSNET-24219Saving docx document to markdown throws exceptionBug
WORDSNET-24231Smart Arts are converted to imagesBug
WORDSNET-24275Cannot save to Azw3 when saving to streamBug
WORDSNET-18530Incorrect calculation of NUMPAGES fields in PDFBug
WORDSNET-24182Incorrect paragraphs count in AW document model for a WML documentBug

Full List of Issues Covering all Changes in this Release (Reported by Java Users)

WORDSNET-24226DOCX to PDF Text is not alligned properlyBug
WORDSNET-24253Tab with leader at the end of line is missed upon renderingBug
WORDSNET-24249Comparing the document with its exact copy shows a differenceBug
WORDSNET-24230Thick cell borders are rendered with artifactsBug
WORDSNET-22351UpdatePageLayout invalidates PrintDate fields values in Header FootersBug
WORDSNET-23551Add an ability to convert EQ field to OfficeMathBug
WORDSNET-23562Numbers with decimal point are mistakenly detected as list item upon loading TXT documentBug
WORDSNET-24139CN-CODE128 font is substituted with Courier NewBug
WORDSNET-24153FileCorruptedException is thrown upon loading RTF documentBug
WORDSNET-24100CommentAddReply adds reply as a separate comment instead of replyBug
WORDSNET-24163Word to PDF Missing contentBug
WORDSNET-24168Text wrapping is incorrect after rendering SVGBug
WORDSNET-24145CardText merge field is not localized to ItalianBug

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 22.9. It includes not only new and obsoleted public methods, but also a description of any changes in the behavior behind the scenes in Aspose.Words which may affect existing code. Any behavior introduced that could be seen as regression and modifies the existing behavior is especially important and is documented here.

Added FieldEQ.AsOfficeMath method

Related issue: WORDSNET-23551

The following public method is added to FieldEQ class:

/// <summary>
/// Returns Office Math object corresponded to the EQ field.
/// </summary>
/// <returns>
/// Returns <c>null</c> if field code is empty or invalid, otherwise an <see cref="OfficeMath"/> instance.
/// </returns>
public OfficeMath AsOfficeMath();

Use Case: Replace EQ field with Office Math.

Document document = new Document(fileName);
FieldEQ fieldEQ = document.Range.Fields.OfType<FieldEQ>().First();

OfficeMath officeMath = fieldEQ.AsOfficeMath();

fieldEQ.Start.ParentNode.InsertBefore(officeMath, fieldEQ.Start);

Use Case: Import Office Math to another document.

Document document = new Document(fileName);
FieldEQ fieldEQ = document.Range.Fields.OfType<FieldEQ>().First();

OfficeMath officeMath = fieldEQ.AsOfficeMath();

Document doc = new Document();
doc.FirstSection.Body.FirstParagraph.AppendChild(doc.ImportNode(officeMath, true));

Added new TxtLoadOptions.AutoNumberingDetection property

Related issue: WORDSNET-23562.

The following public property is added to TxtLoadOptions class:

/// <summary>
/// Gets or sets a boolean value indicating either automatic numbering detection
/// will be performed while loading a document.
/// The default value is <c>true</c>.
/// </summary>
public bool AutoNumberingDetection

Use Case: Explains how to disable automatic numbering detection upon loading TXT document.

// Disable automatic numbering detection.
TxtLoadOptions options = new TxtLoadOptions { AutoNumberingDetection = false };
Document doc = new Document("input.txt", options);

int listItemsCount = 0;
foreach (Paragraph paragraph in doc.GetChildNodes(NodeType.Paragraph, true))
    if (paragraph.IsListItem)

    "The expected number of list items in document with 'AutoNumberingDetection' option disabled is 0." +
    " And the actual is: {0}.", listItemsCount);

// The code produces the following output:
// The expected number of list items in document with 'AutoNumberingDetection' option disabled is 0. And the actual is: 0.

Added PdfSaveOptions.CacheHeaderFooterShapes property

Related issues: WORDSNET-13166, WORDSNET-20613, WORDSNET-10996

The following public property is added to PdfSaveOptions class:

/// <summary>
/// Gets or sets a value determining whether or not to cache shapes placed in header and footer of document.
/// </summary>
/// <remarks>
/// <para> Default value is <c>false</c> and shapes are not cached.</para>
/// <para> When the value is <c>true</c> shapes graphics are written to the PDF document as an xObject.</para>
/// <para> Some shapes are not supported for caching(shapes with fields, bookmarks, HRefs).</para>
/// </remarks>
public bool CacheHeaderFooterShapes
   get { return mCacheHeaderFooterShapes; }
   set { mCacheHeaderFooterShapes = value; }

The new property allows you to cache the header/footer shapes and reduce the size of PDF output file.

Use Case:

Document doc = new Document(fileName);
PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.CacheHeaderFooterShapes= true;
doc.Save(outputFileName, saveOptions);

Allowed creation of structured document tags of Group type at Row level

Related issue: WORDSNET-24144

You can now create SdtType.Group structured document tags at the MarkupLevel.Row level.

Use Case:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert a table.
Table table = builder.StartTable();

// Create a Group structured document tag at the Row level.
StructuredDocumentTag groupSdt = new StructuredDocumentTag(doc, SdtType.Group, MarkupLevel.Row);
groupSdt.IsShowingPlaceholderText = false;

// Create a child row of the structured document tag.
Row row = new Row(doc);

// Append a cell.
Cell cell = new Cell(doc);


// Insert cell contents.
builder.Write("Some text 1");

// Insert text after the table.
builder.Write("Some text 2");

doc.Save(dir + "Out.docx");