Browse our Products

Aspose.Words for C++ 23.2 Release Notes

Major Features

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

  • MOBI (also called PRC, AZW - Amazon Kindle’s proprietary e-book file format) is now supported for import and export.
  • Added an ability to specify the character spacing adjustment of a document.
  • Provided the way to instruct Aspose.Words whether to include textboxes, footnotes and endnotes in word count statistics.
  • Introduced the new option for the document style, which allows specifying whether this style is automatically redefined based on the appropriate value.
  • Significantly improved chart rendering.
  • Implemented support for “Lay out footnotes the way Word 6.x/95/97 does” compatibility option.

Full list of changes

Public API and Backward Incompatible Changes

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

The following public property was added to the Aspose.Words.Document class:

/// <summary>
/// Specifies whether to include textboxes, footnotes and endnotes in word count statistics.
/// </summary>
bool get_IncludeTextboxesFootnotesEndnotesInStat();
System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>();
System::SharedPtr<Aspose::Words::DocumentBuilder> builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);

builder->Writeln(u"Lorem ipsum");
builder->InsertFootnote(Aspose::Words::Notes::FootnoteType::Footnote, u"sit amet");

// Check the option is set to 'false' by default when a new document is created.
System::Console::WriteLine(u"By default for new document this option is set to '{0}'", doc->get_IncludeTextboxesFootnotesEndnotesInStat());
doc->UpdateWordCount();
System::Console::WriteLine(u"Words count without textboxes, footnotes and endnotes: {0}", doc->get_BuiltInDocumentProperties()->get_Words());

// Change option.
doc->set_IncludeTextboxesFootnotesEndnotesInStat(true);
doc->UpdateWordCount();

System::Console::WriteLine(u"Words count with textboxes, footnotes and endnotes: {0}", doc->get_BuiltInDocumentProperties()->get_Words());

/* This code produces the following output:
By default for new document this option is set to 'False'
Words count without textboxes, footnotes and endnotes: 2
Words count with textboxes, footnotes and endnotes: 4
*/

Added public property Document.JustificationMode

A new public property JustificationMode has been added to the Document class:

/// Gets the character spacing adjustment of a document.
Aspose::Words::Settings::JustificationMode get_JustificationMode();

/// Sets the character spacing adjustment of a document.
void set_JustificationMode(Aspose::Words::Settings::JustificationMode value);
System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>(u"in.docx");

// Getting JustificationMode.
Aspose::Words::Settings::JustificationMode justificationMode = doc->get_JustificationMode();
if (justificationMode == Aspose::Words::Settings::JustificationMode::Expand)
{
    // Setting JustificationMode.
    doc->set_JustificationMode(Aspose::Words::Settings::JustificationMode::Compress);
}

Added public property Style.AutomaticallyUpdate

A new public property AutomaticallyUpdate has been added to thr Style class:

/// Specifies whether this style is automatically redefined based on the appropriate value.
///
/// If the property value is set to true, MS Word automatically redefines the current style when
/// the appropriate paragraph formatting has been changed.
///
/// AutomaticallyUpdate property is applicable to paragraph styles only.
///
/// The default value is <c>%false</c>.
bool get_AutomaticallyUpdate() const;

/// Setter for Aspose::Words::Style::get_AutomaticallyUpdate
void set_AutomaticallyUpdate(bool value);
System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>(u"in.docx");
// Getting AutomaticallyUpdate.
if (!doc->get_Styles()->idx_get(Aspose::Words::StyleIdentifier::Normal)->get_AutomaticallyUpdate())
{
    System::SharedPtr<Aspose::Words::Style> style = doc->get_Styles()->Add(Aspose::Words::StyleType::Paragraph, u"Redefined");
    style->set_BaseStyleName(u"Normal");
    // Setting AutomaticallyUpdate.
    style->set_AutomaticallyUpdate(true);
}

Added support for MOBI export

Aspose.Words now can export documents to MOBI file format.

MOBI (also called PRC, AZW) is Amazon Kindle’s proprietary e-book file format.

The following publicly visible enum values were added:

FileFormat::Mobi
SaveFormat::Mobi
System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>(u"in.docx");
doc->Save(u"out.mobi");

or

System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>(u"in.docx");
System::SharedPtr<Aspose::Words::Saving::HtmlSaveOptions> options = System::MakeObject<Aspose::Words::Saving::HtmlSaveOptions>(Aspose::Words::SaveFormat::Mobi);
doc->Save(u"out.mobi", options);

HtmlSaveOptions properties that are not applicable for MOBI export:

  • ImagesFolder
  • ImagesFolderAlias
  • FontsFolder
  • FontsFolderAlias
  • ResourceFolder
  • ResourceFolderAlias
  • ExportImagesAsBase64 (always false)
  • ExportFontsAsBase64 (always false)
  • ExportDropDownFormFieldAsText (always true)
  • ExportTextInputFormFieldAsText (always true)
  • ExportRoundtripInformation (always false)
  • CssStyleSheetType (always CssStyleSheetType::Inline)
  • CssStyleSheetFileName
  • DocumentSplitCriteria (always DocumentSplitCriteria::None)
  • ExportListLabels (always ExportListLabels::ByHtmlTags)
  • ExportRelativeFontSize (always false)

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 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 loading PDF documents.
  • The current release has limited support for database features - C++ doesn’t have common API for DB like .NET System.Data.
  • The current release supports Microsoft Visual C++ version 2017 or higher.
  • 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.
  • The current release supports macOS Big Sur or later (11.5+) for 64-bit Intel Mac platform.