Browse our Products

Aspose.Words for C++ 20.9 Release Notes

Major Features

Starting from this release, we are beginning to publish the Linux version of Aspose.Words for C++. The minimum required version of compilers are the following:

  • GCC 6.3 or higher
  • Clang 3.9.1 or higher

Right now, we support only the x86_x64 platform, but we can add other architectures to the next releases on request.

It is the first version for Linux, so there may be artifacts and differences in behavior from both the Windows version of Aspose.Words for C++ and Aspose.Words for .NET. We continue to work on improving the product and adding features from .NET

We have added the following features from Aspose.Words for .NET on this regular monthly release:

  • VbaReferenceCollection and related types are exposed publicly.
  • Implemented rendering of metafiles with EMF+ containers.
  • The FormField font formatting API was extended.

Limitations and API Differences

Aspose.Words for C++ has some differences as compared to its equivalent .NET version of the API. This section contains information about all such functionality that is not available in the current release. The missing features will be added in future releases.

  • The current release does not support the Metered license.
  • The current release does not support LINQ and Reporting features.
  • The current release does not support OpenGL 3D Shapes rendering.
  • The current release does not support advanced typography based on the HarfBuzz shaper.
  • The current release does not support loading PDF documents.
  • The current release has limited support for database features - C++ does not have a common API for DB like .NET System.Data.
  • The current release supports Microsoft Visual C++ version 2017 or higher and only for the x64 platform.
  • The current release supports GCC 6.3 or higher and Clang 3.9.1 or higher on Linux and only for the x86_x64 platform.

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
WORDSCPP-865Add support for LinuxNew Feature
WORDSNET-522Allow applying font formatting to FormField as a wholeNew Feature
WORDSNET-20289Passing correct border parameters through Words-HTML-Words roundtripNew Feature
WORDSNET-13678Provide way to remove template reference from a Word documentNew Feature
WORDSNET-20986‘Keep with next’ property is changed after RTF to DOCX conversionEnhancement
WORDSNET-20868UnsupportedFileFormatException while loading RTFEnhancement
WORDSCPP-995Aspose.Words for C++ causes STACK OVERFLOWBug
WORDSCPP-996Unable to reference Aspose.Words for C++ in Visual StudioBug
WORDSNET-14910Nesting a Continuous Section Break in a content control tag breaks Aspose?s tree traversalBug
WORDSNET-20585Infinite loop with a table in a footnoteBug
WORDSNET-20996OutOfMemoryException when SaveAs document with charts as PNGBug
WORDSNET-9660Add tests for different row height rule/vertically merged cell combinationsBug
WORDSNET-20399Image is lost after DOCX to PDF conversionBug
WORDSNET-20356Convert DOC to PDF - Bullets getting renumberedBug
WORDSNET-21014Position of rotated shapes with a relative size is incorrectBug
WORDSNET-14444Shape flip is missing after re-saving documentBug
WORDSNET-20489Incorrect text flow for a paragraph wrapped around a floaterBug
WORDSNET-21019Incorrect width of cells after import from RTFBug
WORDSNET-20496Some text in ‘TestJira13969’ aligned incorrectlyBug
WORDSNET-20601Incorrect text wrapping for a line started with a sequence of spaces in compatibility modeBug
WORDSNET-17533Incorrect vertical position of the text in the cellBug
WORDSNET-18261DOCX to PDF conversion issue with table renderingBug
WORDSNET-5808Header format is lost after conversionBug
WORDSNET-17815Some Arabic characters are improperly rendered to another fontBug
WORDSNET-11384Vertically merged cell contents is not broken correctly when the cell is broken in 2013 modeBug
WORDSNET-14369Relations between linked textbox are broken after re-saving documentBug
WORDSNET-19094DOCX to EPUB convertion -> NCX-identifier does not match OPF identifierBug
WORDSNET-20258DOC to HTML throws System.InvalidOperationExceptionBug
WORDSNET-20370Extra spaces are created after links when ODT is re-savedBug
WORDSNET-20727Text order changed when converting word to PDF using 20.6Bug
WORDSNET-20744Chart data labels are lost after DOCX to PDF conversionBug
WORDSNET-20327DOCX to HTML - Single Table represented by 11 Tables in HTMLBug
WORDSNET-20530Text and footnotes pushed to the next page - convert to PDFBug
WORDSNET-20823Insert and Delete Revisions appear against Image when Comparing similar DocumentsBug
WORDSNET-20771Numbers are reversed after DOCX to PDF conversionBug
WORDSNET-19889System.InvalidOperationException is thrown while saving HTML to DOCXBug
WORDSNET-20085HTML to DOCX throw exceptionBug
WORDSNET-20839FileCorruptedException occurs upon loading a DOCX - Unexpected ST_TrueFalse valueBug
WORDSNET-20840Extra space created during Load and Save a DOCBug
WORDSNET-19942Conversion from RTF cutting off-page and losing dataBug
WORDSNET-20845The document appears to be corrupted and cannot be loadedBug
WORDSNET-20662Incorrect breaking of a vertically merged cell when first cell content does not fitBug
WORDSNET-20847NullReferenceException when saving a document page as HTMLBug
WORDSNET-20848System.ArgumentException when import node from another documentBug
WORDSNET-20850System.ArgumentNullException throws when converting attached ODT document to TXTBug
WORDSNET-20579Incorrect numbering during Word to PDF conversionBug
WORDSNET-20804Footer text lost during open/save a DOCXBug
WORDSNET-20630Textbox’s text does not move to next linked TextboxBug
WORDSNET-20862Text position changed after DOCX to PDF conversionBug
WORDSNET-20867System.InvalidCastException while loading RTF filesBug
WORDSNET-20872Incorret rendering of the legend itemsBug
WORDSNET-20873Incorrect rendering of the data label markersBug
WORDSNET-20869Embedded Excel have dif. bits after extractionBug
WORDSNET-20674PDF Conversion causes double spacing in header and footerBug
WORDSNET-20481Vertical Chinese Text in Table Cell Lost during RenderingBug
WORDSNET-20883System.InvalidOperationException occurs upon DOC to RTF conversionBug
WORDSNET-20810Condition with removeif tag failed with Aspose.Words 20.7Bug
WORDSNET-20887DOCX to PDF conversion issue with David font renderingBug
WORDSNET-20602Content Controls Lost during loading and saving a DOCXBug
WORDSNET-20914Aspose.Words.FileCorruptedException occurs upon HTML to PDF ConversionBug
WORDSNET-20918List item’s formatting is incorrect after DOCX->HTML->DOCX round-tripBug
WORDSNET-20926System.NullReferenceException is thrown while saving RTF to PDFBug
WORDSNET-20928Aspose.Words.FileCorruptedException occurs upon loading a DOCXBug
WORDSNET-20932System.InvalidOperationException is thrown while saving DOC to DOCXBug
WORDSNET-20929Document.UpdateFields does not update the TOC correctlyBug
WORDSNET-14743Content control is split into two once child document content is insertedBug
WORDSNET-20957Stack Overflow observed during processing a DOCBug
WORDSNET-20962Additional pages appear in output PDFBug
WORDSNET-18318Export correct styles for list items using Node.ToStringBug
WORDSNET-20614Space between ?and ?Chinese charterers increased in PDFBug
WORDSNET-20637System.ArgumentOutOfRangeException is thrown by LINQ Reporting engineBug
WORDSNET-13509Incorrect breaking of vertically merged cell contentsBug
WORDSNET-14951Content Controls lost during open/save a DOCXBug
WORDSNET-14742Content control is getting deleted while merging two documentBug
WORDSNET-18284Content of nested table is not rendered correctly in output PDFBug
WORDSNET-18285Text of table’s cell does not render correctly in output PDFBug
WORDSNET-5535Space characters take too little space in the rendered outputBug
WORDSNET-20849UpdatePageLayout throws System.Runtime.InteropServices.ExternalExceptionBug
WORDSNET-20194Layout API returns incorrect position for GroupShape and ShapesBug
WORDSNET-3493Checkboxes are rendered incorrectlyBug
WORDSNET-4066Incorrect floating table positionBug

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 20.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.

Changed the behavior of the FormField.Font property

Related issue: WORDSNET-522 Changed the behavior of the ‘FormField.Font’ property. It is currently allowed to apply font formatting to the FormField as a whole. When new Font properties are set, they take effect for the entire FormField, including the field value.

Use Case. Explains how to apply font formatting to the FormField as a whole:

    Document doc = new Document("in.doc");
    doc.Range.FormFields[0].Font.Size = 20;
    doc.Range.FormFields[0].Font.Color = Color.Red;
    doc.Save("out.doc");

Deprecated find replace algorithm returned for compatibility reason

Related issue: WORDSNET-21018 The following member has been added to FindReplaceOptions class

    /// <summary>
    /// Gets or sets a boolean value indicating that old find/replace algorithm is used.
    /// </summary>
    /// <remarks>
    /// Use this flag if you need exactly the same behavior as before advanced find/replace feature was introduced.
    /// Note that old algorithm does not support advanced features such as replace with breaks, apply formatting and so on.
    /// </remarks>
    public bool LegacyMode { get; set; }

Related issue: WORDSNET-13678

Implemented a new VbaReferenceCollection class:

/// <summary>
/// Represents a collection of <see cref="VbaReference"/> objects.
/// </summary>
public sealed class VbaReferenceCollection : IEnumerable<VbaReference>
{
	/// <summary>
	/// Removes the first occurrence of a specified VbaReference item from the collection. 
	/// </summary>
	public void Remove(VbaReference item)

	/// <summary>
	/// Removes the VbaReference element at the specified index of the collection. 
	/// </summary>
	public void RemoveAt(int index)

	/// <summary>
	/// Returns the number of VBA references in the collection.
	/// </summary>
	public int Count
}

Implemented a new VbaReference class:

/// <summary>
/// Implements a reference to an Automation type library or VBA project.
/// </summary>
public abstract class VbaReference
{
	/// <summary>
	/// Gets <see cref="VbaReferenceType"/> object that indicates the type of reference that a VbaReference object represents.
	/// </summary>
	public abstract VbaReferenceType Type { get; }

	/// <summary>
	/// Gets a string value containing the identifier of an Automation type library.
	/// </summary>
	/// <remarks>
	/// Depending on reference type, the value of this property can be:
	/// <list type="bullet">
	/// <item>a LibidReference specified at 2.1.1.8 LibidReference of [MS-OVBA]:
	/// >
	/// <item>a ProjectReference specified at 2.1.1.12 ProjectReference of [MS-OVBA]:
	/// >
	/// </list>
	/// </remarks>
	public abstract string LibId { get; }
}

Implemented a new public enum VbaReferenceType:

/// <summary>
/// Allows to specify the type of a <see cref="VbaReference"/> object.
/// </summary>
public enum VbaReferenceType

Added a new public property into VbaProject class:

/// <summary>
/// Gets a collection of VBA project references.
/// </summary>
public VbaReferenceCollection References

Use Case. Explains how to remove some reference from the collection of references of VbaProject:

public void Main()
{
    Document doc = new Document("test.doc");
 
    // Find and remove the reference with some LibId path.
    const string brokenPath = "brokenPath.dll";
    VbaReferenceCollection references = doc.VbaProject.References;
    for (int i = references.Count - 1; i >= 0; i--)
    {
        VbaReference reference = doc.VbaProject.References[i];
        string path = GetLibIdPath(reference);
        if (path == brokenPath)
            references.RemoveAt(i);
    }
 
    doc.Save("NoBrokenRef.doc"); 
}
 
/// <summary>
/// Returns string representing LibId path of a specified reference. 
/// </summary>
private static string GetLibIdPath(VbaReference reference)
{
    switch (reference.Type)
    {
        case VbaReferenceType.Registered:
        case VbaReferenceType.Original:
        case VbaReferenceType.Control:
            return GetLibIdReferencePath(reference.LibId);
        case VbaReferenceType.Project:
            return GetLibIdProjectPath(reference.LibId);
        default:
            throw new ArgumentOutOfRangeException();
    }
}
 
/// <summary>
/// Returns path from a specified identifier of an Automation type library.
/// </summary>
/// <remarks>
/// Please see details for the syntax at [MS-OVBA], 2.1.1.8 LibidReference. 
/// </remarks>
private static string GetLibIdReferencePath(string libIdReference)
{
    if (libIdReference != null)
    {
        string[] refParts = libIdReference.Split('#');
        if (refParts.Length > 3)
            return refParts[3];
    }
 
    return "";
}

/// <summary>
/// Returns path from a specified identifier of an Automation type library.
/// </summary>
/// <remarks>
/// Please see details for the syntax at [MS-OVBA], 2.1.1.12 ProjectReference. 
/// </remarks>
private static string GetLibIdProjectPath(string libIdProject)
{
    return (libIdProject != null) ? libIdProject.Substring(3) : "";
}