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
Expand to view the full list of issues, covering all changes in this release.
- Make the Document.DocPr.DoNotIncludeSubDocsInStats property public
- Count words from Footnotes and Endnotes
- Add support for saving to MOBI
- Provide functionality to merge PDF documents
- Provide public API to get/set characterSpacingControl
- Compress generated AZW3 documents
- Implement relative coordinates support for rendering radial gradient brushes
- Support rendering of the trendline equation
- Support endering of the trendline R-squared value
- Support rendering trendline equation and R-squared value on chart
- Rendering of power trendline label
- Rendering of polynomial trendline label
- Prepare .Net 7 build and tests
- Rendering of logarithmic trendline label
- Rendering of exponential trendline label
- Provide an ability of lazy document preview rendering
- HTML to Word to PDF - Inline Anchor Tags
- Load fonts in FontSearchInfoLoader in parallel
- Support “Lay out footnotes the way Word 6.x/95/97 does” compatibility option
- Add bookmarks for imported HTML elements with “id” attributes so that they can be referenced by hyperlinks in the same document
- DOCX->HTML->DOCX: Preserve TOC field codes
- Lowered inline image is improperly imported from HTML
- Manipulations with e.Node (on NodeInserted and NodeInserting events) have no effect in the result document
- Issue with Document.ExtractPages
- Different tab spaces inside the same ordered list
- Document with embedded fonts is rendered improperly
- Bullet point missing when mapping input XML to SDT
- Image cropping is lost after open/save RTF document
- Aspose.Words improperly updates formula fields hen group separator is used in numbers
- Header row is doubled after using ExtractPages method
- BadImageFormatException is thrown when using Aspose.Words.Shaping.Harfbuzz in Web application
- HarfBuzz does not work in .NET Web Application
- Document comparison produces unnecessary revisions
- FileCorruptedException is thrown upon loading DOCX document with HTML altChunk
- Position of footnote is incorrect after rendering
- Hanging indentation is lost after open/save DOCX document
- DOCX to PDF: Extra page is added upon conversion
- “TypeError: unknown wrapper type” error when try setting LayoutEnumerator.current
- Line count is incorrect with sub-docs included in statistics
- ArgumentException: ‘Parameter is not valid.’ is thrown upon converting DOCX to PDF
- LINQ Reporting Engine - JsonDataSource gets confused about objects
- Distorted image when converting from DOCX to HTML
- DOCX to HTML: Document not split by headings
- Stamp Image should be transparent in Html Fixed
- Radial gradients are rendered incorrectly
- Footer is lost after rendering ODT document
- Aspose.Words replace behavior differs from MS Word when matched text contains a shape
- Chart contents are lost after saving DOCX to PDF
- Trend-line Label of chart is lost after conversion from DOCX to HTML
- Trendline Equation Label Data (Formulae) of Chart in Word DOCX missing in PDF
- Chart element missing in AW output conversion from DOCX to PDF
- Data of Chart Labels missing in PDF
- Chart series is lost after conversion from DOCX to PDF
- Colors of image are inverted after conversion of PDF to DOCX
- OverflowException is thrown upon comparing documents
- SDT dropdown list item with empty value is lost after open/save document
- ArgumentOutOfRangeException when Range.Replace is sued with “A*” regex
- Update Noto fallback table to use new fonts
- PDF to PDF with signing: Formatting issues
- ArgumentOutOfRangeException when converting DOCX to PDF
- FileCorruptedException is thrown upon loading DOCX document
- DOCX->HTML->DOCX: Footer differences
- NullReferenceException is thrown upon calling UpdatePageLayout after comparing documents
- Parenthesis in RTL document are reversed when render the document with HarfBuzz text shaping
- Calibri (Body) fonts is substituted with Times New Roman upon rendering the document
- Make Style.AutomaticallyUpdate property public
- Word to PDF: links are not tagged
- Invalid positioning of signature
- Inconsistent result when use number formats in LINQ Reporting Engine and Mail Merge
- Link is truncated in PDF document
- Inaccurate table size when inserting HTML string into another table
- ArgumentOutOfRangeException is thrown upon rendering documents
- Unable load harfbuzz lib in docker
- TOC and List Numbering issues during Word-HTML-Word round-trip
- List item’s indent is incorrect after DOCX-HTML-DOCX roundtrip
- List labels are exported incorrectly when document is save to HTML using Node.ToString
- Image in header is flipped on PDF import
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 Aspose.Words.Document class:
/// <summary>
/// Specifies whether to include textboxes, footnotes and endnotes in word count statistics.
/// </summary>
bool get_IncludeTextboxesFootnotesEndnotesInStat();
Use Case: Explains how to include or exclude textboxes, footnotes and endnotes from word count statistics.
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 class Document:
/// 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);
Use Case: Explains how to get and set the character spacing adjustment of a document.
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 class Style:
/// 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);
Use Case: Explains how to get and set AutomaticallyUpdate property of a Style.
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
The use cases for saving a document to MOBI file format are as follows:
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.