Browse our Products
Aspose.Words for C++ 23.8 Release Notes
Major Features
There are 107 improvements and fixes in this regular monthly release. The most notable are:
- Added support for CITATION and BIBLIOGRAPHY fields.
- Introduced functionality to automatically generate a Table of Contents (TOC) for MOBI documents.
- Expanded PdfEncryptionDetails constructor with PdfPermissions.
- Introduced a new public property to specify the size of rendered images in pixels.
- Implemented shaping of vertical text for EMF metafiles.
Full list of changes
Expand to view the full list of issues, covering all changes in this release.
- Unexpected break (text wrapping) occurs in Cell when rendered to PDF
- Amended version of the Aspose.Word SaveOption WordHtmlFixedSaveOptions
- Add navigation (table of contents, TOC) to generated MOBI documents
- Content are distorted and truncated after MHTML to PDF conversion
- Document.UpdateTableLayout changes the table’s width in output PDF
- Text wrapping problem in Tables during HTML to PDF conversion
- HTML to PDF conversion issue with table’s width
- Table Cells widths are incorrect in rendered TIFF
- Tables in HTML file is not proper in the converted file
- Content are truncated in output PDF after conversion from MHTML
- Table layout is badly formatted after conversion from MHT to DOCX/PDF
- Conversion issue in MSG to PDF - One character per line in Table
- Table content is partially invisible after rendering MHTML document
- Width of table’s cell is changed after conversion from DOCX to PDF
- Image is getting trimmed while converting from DOCX to PDF
- Table/Cell width is not correct in rendered document
- Table Column Cell Widths are incorrect in rendered PDF
- Cell spacing issue while converting DOC to PDF
- Table content is truncated when saving to PDF
- Incorrect document layout upon rendering
- Enable the new table grid re-calculation logic for formats other than DOC/DOCX
- Consider providing PdfEncryptionDetails constructor overload that accepts PdfPermissions and a parameter
- Implement ImageSaveOptions.ImageSize property
- TOC not being updated correctly
- Cell borders with cell spacing 0" are not rendered properly
- A single word Run in Cell is rendering in two lines in PDF
- HTML to PDF conversion issue with Text rendering
- MHTML to PDF conversion issue with number rendering
- Cell width is not calculated correctly during rendering to PDF
- HTML to PDF conversion issue with table’s width
- Table formatting is lost after HTML to PDF
- HTML table not displayed correctly in PDF
- Cell text renders lower than the actual position in PDF
- Table is rendered outside the page in output PDF
- Tables have incorrect widths in PDF
- Content is shifted when rendering mht to pdf or image
- HTML to PDF conversion issue with custom margin
- MHTML to PDF conversion issue with content position
- Incorrect table column width after MHTML to PDF
- Text in a table cell is wrapped when saved to PDF
- MHTML to PDF conversion issue with table’s cell width
- Table width is lost after conversion from HTML to PDF
- When converting HTML to PDF, the output is shrunken
- Incorrect Table layout when converting HTML to PDF
- DOCX to PDF conversion issue with cell width after using LINQ
- Tables are lost in output PDF when UpdateTableLayout is called
- Wrong additional columns appear in Table when converting HTML to DOCX
- Table cell width is changed when HTML is converted to PDF
- HTLM to PDF conversion - Table widths are not correct
- Table moved to the right after conversion to PDF
- Contents are Lost after HTML to PDF conversion
- Table width is incorrect after rendering MHTML document
- DOCX to PDF conversion issue
- Consider adding a warning about missing, empty or not accessing fonts folder
- Incorrect space before the first line on the page after a page break
- Cells spacing is ignored upon rendering
- HTML to PDF conversion issue with table’s cells
- Table Cells have incorrect Widths causing more pages in PDF
- Numbering is changed after converting DOCX to RTF
- Numbers format is changed after conversion from DOCX to XLSX
- DOCX to MD: incorrect heading levels in the output document
- OleFormat.GetRawData returns null
- Numbering is changed after DOCX to RTF conversion
- Footer looks ugly after conversion to XLSX
- Exception is thrown when handling SVG image
- Data label font size changes are not applied
- Data label font size and color changes are not applied
- Remove obsolete SaveOptions.UpdateSdtContent property
- Pdf2Word should process XForm dictionary with missing “Type” key
- LINQ Reporting Engine - JsonDataSource trims whitespaces for string values
- The style changed after xmlns modification
- Incorrect calculation of the minimum height of the math formula
- RTL content is moved outside the page after rendering
- Document comparison long execution time
- The math text size is changed after converting to PDF
- Footer from the first page is mover to the top of the second page after PDF to DOCX conversion
- Hebrew text is rendered improperly
- CITATION and BIBLIOGRAPHY fields are not updated by Document.UpdateFields method
- Performance degradation of UpdateFields
- NullReferenceException is thrown upon comparing documents
- Issue with TIFF images
- IndexOutOfRangeException is thrown upon rendering document
- StructuredDocumentTag.GetText() returns incorrect value for Date SDT
- Bookmark end position is changed after comparing documents
- An exception occurs while saving pages as SVG
- Chart area is shifted upon rendering
- Incorrect shape sizes or properties on HTML to DOCX conversion
- REF field is not updated properly
- “Footnote Reference” is not properly updated
- Bulleted list is converted to numbered list after open/save
- DOCX to PDF with HarfBuzz: Symbols not converted correctly
- Incorrect placement of text in a fraction when using a font with “Internal Leading”
- FileCorruptedException is thrown upon loading HTML document
- Implement PseudoInline property reading for DOC format
- FileCorruptedException is thrown upon loading DOTX document
- Text is wrapped improperly upon rendering
- Problem with Captions and References in the first paragraph
- Text outline in EMF shape partially invisible in AW pdf output
- Image is cropped after rendering
- Shadow effects are rendered incorrectly for glyphs with simulated bold and/or italic style
- Thaana RTL text is exported to PDF as LRT
- Three pages instead of two in DOCX file on Linux
- Hairlines in metafile are barely invisible in Acrobat reader.
- Images are not displayed in Mac TextEdit after open/save RTF document
- Failed to open PDF file generated by our apps
- License Conflict with Cortex XDR
- Rendering document causes tables to continue outside the page
Public API and Backward Incompatible Changes
This section lists public API changes that were introduced in Aspose.Words 23.8. 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 a new public property to specify the size of rendered images in pixels
The following public property has been added to the ImageSaveOptions class:
/// Gets or sets the size of a generated image in pixels.
///
/// This property has effect only when saving to raster image formats.
///
/// The default value is (0 x 0), which means that the size of the generated image will be calculated
/// according to the size of the image in points, the specified resolution and scale.
ASPOSE_WORDS_SHARED_API System::Drawing::Size get_ImageSize() const;
/// Setter for Aspose::Words::Saving::ImageSaveOptions::get_ImageSize
ASPOSE_WORDS_SHARED_API void set_ImageSize(System::Drawing::Size value);
Use Case
This use case explains how to render every page of a document to a separate TIFF image at 2325x5325 pixels and 600 dpi:
// Create an "ImageSaveOptions" object which we can pass to the document's "Save" method | |
// to modify the way in which that method renders the document into an image. | |
System::SharedPtr<Aspose::Words::Saving::ImageSaveOptions> options = System::MakeObject<Aspose::Words::Saving::ImageSaveOptions>(Aspose::Words::SaveFormat::Tiff); | |
for (int32_t i = 0; i < doc->get_PageCount(); i++) | |
{ | |
// Set the "PageSet" property to the number of the first page from | |
// which to start rendering the document from. | |
options->set_PageSet(System::MakeObject<Aspose::Words::Saving::PageSet>(i)); | |
// Export page at 2325x5325 pixels and 600 dpi. | |
options->set_Resolution(600.0f); | |
options->set_ImageSize(System::Drawing::Size(2325, 5325)); | |
doc->Save(get_ArtifactsDir() + System::String::Format(u"ImageSaveOptions.PageByPage.{0}.tiff", i + 1), options); | |
} |
Added PdfEncryptionDetails ctor overload with PdfPermissions
ASPOSE_WORDS_SHARED_API PdfEncryptionDetails(const System::String& userPassword, const System::String& ownerPassword, Aspose::Words::Saving::PdfPermissions permissions);
Use Case
This use case explains how to use PdfPermissions:
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"Hello world!"); | |
// Extend permissions to allow the editing of annotations. | |
System::SharedPtr<Aspose::Words::Saving::PdfEncryptionDetails> encryptionDetails = System::MakeObject<Aspose::Words::Saving::PdfEncryptionDetails>(u"password", System::String::Empty, Aspose::Words::Saving::PdfPermissions::ModifyAnnotations | Aspose::Words::Saving::PdfPermissions::DocumentAssembly); | |
// Create a "PdfSaveOptions" object that we can pass to the document's "Save" method | |
// to modify how that method converts the document to .PDF. | |
System::SharedPtr<Aspose::Words::Saving::PdfSaveOptions> saveOptions = System::MakeObject<Aspose::Words::Saving::PdfSaveOptions>(); | |
// Enable encryption via the "EncryptionDetails" property. | |
saveOptions->set_EncryptionDetails(encryptionDetails); | |
// When we open this document, we will need to provide the password before accessing its contents. | |
doc->Save(get_ArtifactsDir() + u"PdfSaveOptions.EncryptionPermissions.pdf", saveOptions); |
Added the ability to generate TOC (table of contents) for MOBI documents
Now Aspose.Words for C++ can generate TOC (table of contents) for MOBI documents.
Desired depth of TOC can be specified same way as it’s done for AZW3 or EPUB documents using HtmlSaveOptions.NavigationMapLevel property.
Use Case
This use case explains how to create MOBI document with TOC and specify NavigationMapLevel:
System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Big document.docx"); | |
System::SharedPtr<Aspose::Words::Saving::HtmlSaveOptions> options = System::MakeObject<Aspose::Words::Saving::HtmlSaveOptions>(Aspose::Words::SaveFormat::Mobi); | |
options->set_NavigationMapLevel(5); | |
doc->Save(get_ArtifactsDir() + u"HtmlSaveOptions.CreateMobiToc.mobi", options); |
Note: Currently MOBI TOC won’t be displayed by some viewers. For example, MOBI TOC won’t be displayed by calibre app.
Supported CITATION and BIBLIOGRAPHY fields
Now the CITATION and BIBLIOGRAPHY fields are supported by Aspose.Words and can be updated with the Document.UpdateFields, Range.UpdateFields or Field.Update methods.
Aspose.Words supports following citation and bibliography styles:
- APA - APASixthEditionOfficeOnline.xsl
- Chicago - CHICAGO.XSL
- GB7714 - GB.XSL
- GOST - Name Sort - GostName.XSL
- GOST - Title Sort - GostTitle.XSL
- Harvard - Anglia - HarvardAnglia2008OfficeOnline.xsl
- IEEE - IEEE2006OfficeOnline.xsl
- ISO 690 - First Element and Date - ISO690.XSL
- ISO 690 - Numerical Reference - ISO690Nmerical.XSL
- MLA - MLASeventhEditionOfficeOnline.xsl
- SIST02 - SIST02.XSL
- Turabian - TURABIAN.XSL
The IBibliographyStylesProvider interface and the FieldOptions.BibliographyStylesProvider property are introduced to override built-in styles or provide custom one:
/// \interface IBibliographyStylesProvider
/// Implement this interface to provide bibliography style for
/// the <see cref="Aspose::Words::Fields::FieldBibliography">FieldBibliography</see> and <see cref="Aspose::Words::Fields::FieldCitation">FieldCitation</see> fields when they're updated.
class ASPOSE_WORDS_SHARED_CLASS IBibliographyStylesProvider : public virtual System::Object
{
public:
/// Returns bibliography style.
///
/// @param styleFileName The bibliography style file name.
///
/// @return The <see cref="System::IO::Stream">Stream</see> with bibliography style XSLT stylesheet.
virtual System::SharedPtr<System::IO::Stream> GetStyle(System::String styleFileName) = 0;
};
class ASPOSE_WORDS_SHARED_CLASS FieldOptions final : public System::Object
{
/// Gets a provider that returns a bibliography style for
/// the <see cref="Aspose::Words::Fields::FieldBibliography">FieldBibliography</see> and <see cref="Aspose::Words::Fields::FieldCitation">FieldCitation</see> fields.
ASPOSE_WORDS_SHARED_API const System::SharedPtr<Aspose::Words::Fields::IBibliographyStylesProvider>& get_BibliographyStylesProvider() const;
/// Sets a provider that returns a bibliography style for
/// the <see cref="Aspose::Words::Fields::FieldBibliography">FieldBibliography</see> and <see cref="Aspose::Words::Fields::FieldCitation">FieldCitation</see> fields.
ASPOSE_WORDS_SHARED_API void set_BibliographyStylesProvider(const System::SharedPtr<Aspose::Words::Fields::IBibliographyStylesProvider>& value);
}
Use Case
This use case explains how to use IBibliographyStylesProvider:
System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Bibliography.docx"); | |
doc->get_FieldOptions()->set_BibliographyStylesProvider(System::MakeObject<ApiExamples::ExField::BibliographyStylesProvider>()); | |
doc->UpdateFields(); | |
doc->Save(get_ArtifactsDir() + u"Field.ChangeBibliographyStyles.docx"); | |
class BibliographyStylesProvider : public Aspose::Words::Fields::IBibliographyStylesProvider | |
{ | |
private: | |
System::SharedPtr<System::IO::Stream> GetStyle(System::String styleFileName) override; | |
}; | |
System::SharedPtr<System::IO::Stream> ExField::BibliographyStylesProvider::GetStyle(System::String styleFileName) | |
{ | |
return System::IO::File::OpenRead(get_MyDir() + u"Bibliography custom style.xsl"); | |
} |
The property HtmlSaveOptions.EpubNavigationMapLevel has been deprecated.
The HtmlSaveOptions.EpubNavigationMapLevel property is marked as obsolete. Please, use HtmlSaveOptions.NavigationMapLevel instead.
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 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.