Support for adding image as blob in Aspose.Slides

Share on FacebookTweet about this on TwitterShare on LinkedIn

Hi guys! In today’s blog I would like to share my experience after using latest Aspose.Slides 19.6 which has been enriched with improved image management support features. The best thing about about Aspose.Slides is that it has a monthly release where .NET, Java, Android via Java and C++ based APIs are published together. So, whats available in .NET based API is also available for Java, Android via Java and C++ based APIs. This way the users feels comfortable with API they are using and with same features available across the board.

In following sections, I am going to give you a walk through of what new features have been included and what improvements have been carried in API.

Add Image as BLOB in Presentation

When dealing with PowerPoint presentation working with images in presentation play a pivotal role. Some times there is requirement of adding huge images in presentation. MS PowerPoint include such images as blobs. We have included a new method to IImageCollection interface and ImageCollection class to support adding large image as streams to treat them as BLOBs.

This example demonstrates how to include the large BLOB (image) and prevent a high memory consumption.

The similar Java based example for this is:

The similar C++ based example for this is:

Get Effective Background Values Of Slide

Now, Aspose.Slides provides support to represent effective background of slide which contains information about effective fill format and effective effect format. To achieve this, IBackgroundEffectiveData interface and its implementation by BackgroundEffectiveData class have been added.

CreateBackgroundEffective method has been added to IBaseSlide interface and BaseSlide class. This method allows to get effective values for slides background. The following example shows how to get effective background values of slide.

The similar Java based example for this is:

The similar C++ based example for this is:

Saving Progress Updates in Percentage during rendering

When using, Aspose.Slides some times one need to save huge presentation files or convert huge presentation files to PDF. In such situation, the API user may experience wait condition till the time the saving or rendering process is completed and such situation is sometimes annoying. In order to mitigate this a new IProgressCallback interface has been added to ISaveOptions interface and SaveOptions abstract class.IProgressCallback interface represents a callback object for saving progress updates in percentage.

The following example exhibit the use of new future while exporting to PDF.

The similar Java based example for this is:

The similar C++ based example for this is:

Wait, there’s many other features, enhancement, and bug fixes included in this release. Here you can get the detail!

When time allows you can check out API examples at Github, talk about this release and other API related issues in our forum.

Posted in Aspose.Slides Product Family | Leave a comment

Improved Text Alignment in Exported Document and Upgraded Aspose.Words for Reporting Services to Aspose.Words for .NET 19.6

Share on FacebookTweet about this on TwitterShare on LinkedIn
Aspose.Words for SSRS icon

Hi guys! We are pleased to announce new release of Aspose.Words for Reporting Services. We have upgraded it to the latest version of Aspose.Words for .NET 19.6. In this release, we have fixed text alignment issue that is caused when HTML formatting is used in RDL. We have also fixed NullReferenceException that is thrown while exporting RDLC. Please check the release notes for more detail.

You can download the latest release of Aspose.Words for Reporting Services 19.6 from the following link:

Download Aspose.Words for Reporting Services 19.6

When time allows you can check documentation of Aspose.Words for Reporting Services and talk about this release and other related issues in our forum.

Posted in Aspose.Words Product Family | Leave a comment

Set ODS background and Convert Dates to Japanese Dates using Aspose.Cells for .NET 19.5

Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.Cells for .NET logoHi Guys, in the blog you will learn how to use and implement some valuable features via Aspose.Cells. This time we have added new features regarding ODS file format. For example, you will learn on how to process the ODS file background to create furnished output files having color and image in the background. Moreover, Aspose.Cells provides a way to convert Gregorian dates to Japanese dates. You may find these exciting features and other enhancements in the release. So let’s not wait another moment to review the release notes.  To get essence of the public release (Aspose.Cells for .NET v19.5), I am giving you preview of the new features and other enhancements available in it.

Convert Dates to Japanese Dates

Aspose.Cells can convert Gregorian dates to Japanese dates. During this conversion, the changes in the era are also considered. This feature is demanded by some users for their scenarios. Visit the following article for a details with example:

Converting dates to Japanese dates

Following image provides an overview of this feature:

Read Background Information from OSD file

This time we have enhanced the capability of Aspose.Cells to process ODS files. One of the features which were requested by users was to read the background information from the ODS files. A new class ODSPageBackground is introduced which manages the background of an ODS file. Moreover, there are two options as the background of an ODS file, one is graphics and other is color. For this purpose, ODSPageBackgroundType enumerator is introduced which contains three values None, Color and Graphic.

For depicting the position of the background content, there are nine possible locations on the page. Now you can not only identify the type and position but also can save the graphic to a file if required. All these features can be exercised using a ready to run code along with a sample file in the following article:

Read Background Information from OSD file

Following is the image showing the input and output using these features:

Set background color

As mentioned above that we have two options to set the background of an ODS file. Here I will describe the colored background for which you have to use ODSPageBackground.Color property. Coding this feature is quite simple such that first get the ODSPageBackground object from the template file and then set color and type and that’s all. Have a look at the following article which provides a complete working sample code to demonstrate this feature.

Add colored background to ODS file

Following is the image of output file created by above sample code:

Note that there is no need to set the range of text as this feature will automatically set background for the entire data in the above example.

Set background graphics

Setting a graphical background is quite common while working with worksheets. This area is also covered by this new feature where property ODSPageBackground.GraphicData is available to serve this purpose. Visit the following article which demonstrates this feature. You can see that usage is quite simple where you need to set the background type, byte array containing image data and ODSPageBackgroundGraphicType. You may visit the following article to get a working code sample for this feature:

Add Graphic Background to ODS file

Following will be the output of this sample code in the print preview using OpenOffice Calc.

Import custom objects to merged area

The feature of importing custom objects to Excel file is already available in Aspose.Cells, however, if the destination file contains a merged area where data is to be imported, there can be issues. This feature is available now where you can import data to a merged area in the output file. You may set ImportTableOptions.CheckMergedCells to true and pass the ImportTableOptions object along with the list of columns/properties to the method to display your desired list of objects. Visit the following article for a detailed example:

Importing from Custom Objects to merged area

Following image provides an overview of this feature:

Other enhancements and fixes

  • Invalid number order when converting Arabic font to PDF.
  • Control all external data with IStreamProvider interface.
  • The method “String.StartsWith(“\0″)” always returns true on macOS.
  • Exception when setting HTML string using the RGBA color model.

To use these features and avail other enhancements and fixes, I recommend you to try the release Aspose.Cells for .NET v19.5. Moreover, I recommend you to browse Developers’ Guide for your complete reference on what you can deliver using the APIs. Also, you are always welcome to share your review, concerns or feedback on forums.

Posted in Aspose.Cells Product Family | Leave a comment

Process ODS background and Import from Custom objects using Aspose.Cells for Java 19.5

Share on FacebookTweet about this on TwitterShare on LinkedIn

We are happy that once again we got the chance to present an updated and enhanced version of Aspose.Cells for Java v19.5. This time we have added new features for processing the ODS file background to create more user-friendly output files having color and image in the background. We have also enhanced our rendering features to HTML, PDF and improvements in many functions of common use. Well, I think rather than writing a lot about these features one by one, better to have a brief overview of the new version from the release notes and then start exploring this release. What do you say?

Read Background Information from OSD file

This time we have enhanced the capability of Aspose.Cells to process ODS files. One of the features which were requested by users was to read the background information from the ODS files. A new class ODSPageBackground is introduced which manages the background of an ODS file. Moreover, there are two options as the background of an ODS file, one is graphics and other is color. For this purpose, ODSPageBackgroundType enumerator is introduced which contains three values NONE, COLOR and GRAPHIC.

For depicting the position of the background content, there are nine possible locations on the page. These are defined by introducing an enumerator named ODSPageBackgroundGraphicPositionType. Now you can not only identify the type and position but also can save the graphic to a file if required. All these features can be exercised using a ready to run code along with a sample file in the following article:

Read Background Information from OSD file

Following is the image showing the input and output using these features:

Set background color

As mentioned earlier that we have two options to set the background of an ODS file. Here I will describe the colored background for which you have to use ODSPageBackground.Color property. Coding this feature is quite simple such that first get the ODSPageBackground object from the template file and then set color and type and that’s all. Have a look at the following article which provides a complete working sample code to demonstrate this feature.

Add colored background to ODS file

Following is the image of output file created by above sample code:

Note that there is no need to set the range of text as this feature will automatically set background for the entire data in the above example.

Set background graphics

Setting a graphical background is quite common while working with worksheets. This area is also covered by this new feature where property ODSPageBackground.GraphicData is available to serve this purpose. Visit the following article which demonstrates this feature. You can see that usage is quite simple where you need to set the background type, byte array containing image data and ODSPageBackgroundGraphicType. You may visit the following article to get a working code sample for this feature:

Add Graphic Background to ODS file

Following will be the output of this sample code in the print preview using OpenOffice Calc.

Import custom objects to merged area

The feature of importing custom objects to Excel file is already available in Aspose.Cells, however, if the destination file contains a merged area where data is to be imported, there can be issues. This feature is available now where you can import data to a merged area in the output file. You may set ImportTableOptions.CheckMergedCells to true and Pass the ImportTableOptions object along with the list of columns/properties to the method to display your desired list of objects. Visit the following article for a detailed example:

Importing from Custom Objects to merged area

Following image provides an overview of this feature:

Other upgradations

  • This time we have paid special attention to enhancements for related to the rendering of Excel files to PDF. Like displaying wrong values for shapes, turning over text like phone numbers, etc. and changing the text order, these all issues are resolved for rendering to PDF.
  • Similarly, Excel to HTML related issues were also addressed where sometimes transparency of charts was lost, charts were missed and rendering issues in CentOS were faced. All these issues are addressed in this latest release.
  • Data was not extracted from some MS Excel 95 files. Enhancements are done to sort out such issues in the product.
  • Some functions like DATEVALUE, VLOOKUP, and TEXT were having some minor issues which are also addressed and now these are enhanced to work more efficiently and error-free.
  • Exceptions are also handled like IllegalStateException and java.lang.ArrayIndexOutOfBoundsException while loading MS Excel 5.0/95 XLS files, both the exceptions are removed and now these files can be loaded without any issue.

Now this is the time to go through and start using the innovative features and examples using this latest release Aspose.Cells for Java 19.5. Well organized complete examples along with the template files can be exercised by browsing Developers’ Guide and downloading a working project from github here. Our forums are always open for you to share your thoughts and ask any query or issue related to our complete range of products.

Posted in Aspose.Cells Product Family | Leave a comment

Read VBA Macros, Convert to Horizontally Merged Cells, Compress Metafiles, Add Table Styles using Aspose.Words for Java 19.6

Share on FacebookTweet about this on TwitterShare on LinkedIn

In this post, I will enlist/explain new features introduced in Aspose.Words for Java 19.6 release.

Access/Read VBA Macros from Word Document

Aspose.Words now provides three classes to get access to the VBA project source code. The VBAProject class provides access to VBA project information, the VbaModuleCollection class returns collection of VBA project modules and VbaModule class provides access to the VBA project module. The code example given below shows how to read VBA Macros from the Word document:

Convert to Horizontally Merged Table Cells

In the latest versions of MS Word, Table cells are merged horizontally by their width. Whereas, the merge flags were used in the older technique, like Cell.CellFormat.HorizontalMerge. The merge flags are not used when cells are horizontally merged by their width and it is also not possible to detect which cells are merged. Aspose.Words now provides ConvertToHorizontallyMergedCells method to convert cells which are horizontally merged by their widths to the cell horizontally merged by flags. It simply transforms the table and adds new cells when needed.

The following code example shows the working of the above-mentioned method.

Compress Metafiles in Word Document

In MS Word, all the metafiles are compressed by default regardless of their size. However, Aspose.Words used to compress large metafiles only and smaller ones were not compressed just because of better performance. Aspose.Words now provides a property AlwaysCompressMetafiles, to facilitate the users if they want to compress all the metafiles either large or small. Its default value is true which means that all metafiles shall be compressed regardless of their sizes and false means that small metafiles shall not be compressed for performance reason.

Working with Table Styles

You can change the format of Table by using Table styles in MS Word. With Table style, you can change the look of Table e.g. border, shading, alignment, text font etc. In this release of Aspose.Words, new public properties have been added into the TableStyle class. We have implemented new public types ConditionalStyleCollection, ConditionalStyle, and ConditionalStyleType. Please read the following article for more details.

Working with Table Styles

License.IsLicensed Marked as Obsolete

Starting from Aspose.Words 19.6, the License.IsLicensed property is marked as obsolete. We will remove it in later releases

/// <summary>
/// Returns true if a valid license has been applied; false if the component is running in evaluation mode.
/// </summary>
[Obsolete("This property is obsolete. SetLicense() method raises an exception if license is invalid.")]
public bool IsLicensed

Obsolete methods Range.Replace Removed

We have removed the following Range.Replace methods from Aspose.Words API.

public int Replace(string pattern, string replacement)
public int Replace(string pattern, string replacement, FindReplaceOptions options)
public int Replace(Regex pattern, string replacement)
public int Replace(Regex pattern, string replacement, FindReplaceOptions options)

See also Useful Links

Keeping the Aspose tradition, you are welcome to shape the upcoming releases of Aspose.Words for Java API by posting your suggestions and concerns in the Aspose.Words for Java Support Forum.

Posted in Aspose.Words Product Family | Leave a comment

IMAP Multi-connection Backup and Restore option available in Aspose.Email 19.5

Share on FacebookTweet about this on TwitterShare on LinkedIn

Hello firends! in today’s blog, I am going to introduce you to what new features have been included in Aspose.Email 19.5. As always, Aspose team has published both .NET and Java based API having same features sets simultaneously. This way, the users of both API’s can make use of new features irrespective of application and platform type. In following sections, I will shed some light on new features available in API and how to use them.

Getting OLM Folder path

Now, you have got support to traverse through folders and sub-folders inside OLM storage file and access them OlmFolder.Path property which returns the folder path. In following example, we have demonstrated the recursive use of OlmFolder.Path property to get the folder and sub-folders paths in the OML file.

The similar Java based example for this is:

Getting user defined folders only inside PST

The PST/OST files may contain folders which have been created by user. Now, Aspose.Email provides the ability to access only user-defined folders by using the PersonalStorageQueryBuilder.OnlyFoldersCreatedByUser property. One can set the PersonalStorageQueryBuilder.OnlyFoldersCreatedByUser property to True to get only user-defined folders. The following example demonstrates the use of PersonalStorageQueryBuilder.OnlyFoldersCreatedByUser and getting user-defined folders.

The similar Java based example for this is:

IMAP Multi-connection Backup and Restore

When working with a large number of messages, the backup/restore operation can take a long time. For this, the API provides support for multiple connections during backup and restore operation. To enable the MultiConnection mode, set ImapClient.UseMultiConnection property to MultiConnectionMode.Enable. The following examples demonstrate the use backup and restore operation with MultiConnection mode enabled.

The similar Java based example for this is:

There’s many other features, enhancement, and bug fixes included in this release. Here you can get the detail!

When time allows you can check out API examples at Github, talk about this release and other API related issues in our forum.

Posted in Aspose.Email Product Family | Leave a comment

Upcoming Release of Aspose.Page for .NET and Java

Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose has always striven to bring you the best and most useful products for developing solutions efficiently. Maintaining the enthusiasm to provide what is best for productivity, it is an honor to announce an upcoming product i.e. Aspose.Page. Aspose.Page will soon going to be a new member in APIs’ catalog offered by Aspose. The API will be released for .NET and Java platforms initially and will be offered with a rich feature set. Speaking of the features of the API, it will contain all features which have currently been offered by the two APIs i.e. Aspose.XPS and Aspose.EPS. Yes, this is right. Single API will be offering complete functionalities offered by two different APIs. It will not sound strange if you call this a MERGER of two APIs. Most of you guys who already have worked with Aspose.XPS and Aspose.EPS, may be familiar with the features offered by these. However, you can have a sneak peek into what Aspose.Page will be offering in its first release:

Features in First Release of Aspose.Page

The first version of the API will be able to:

  • Create, edit and save XPS document
  • Convert XPS document to PDF and image
  • Convert PostScript (PS) and Encapsulated PostScript (EPS) files to PDF and image

EPS Features

  • Supports PostScript language levels 1-3 with an exception of font types: Type2 (CFF), Type14 (Chameleon), Types 9, 10, 11, 32 (CID-Keyed)
  • Save as PDF
  • Save as raster image

XPS Features

  • Create and edit XPS document
  • Add or remove pages of XPS document
  • Work with canvases, paths and glyphs elements
  • Create vector graphics shapes (Path element) using a set of primitives (elliptical arcs, Bezier curve segments and straight line segments)
  • Create text strings (Glyphs element)
  • Group elements (Canvas element) to manipulate a group as a whole
  • Manipulate the appearance of graphics and text strings
  • Use brushes of different types including solid color brush, image brush, visual brush etc
  • Specify colors in different color spaces including sRGB, scRGB and any space based on ICC profile
  • Work with multiple documents inside an XPS document
  • Preserve print tickets in opened XPS document if any
  • Add default print tickets into new XPS document or an opened one if there’re no tickets in it
  • Perform cross-package operations, e.g. add/insert an element from another document (XPS package), assign a property value created in another document’s context, create elements/property values based on file resources created in another document’s context, add/insert a page from another document
  • Get a job/document/page print ticket object and link it to another job/document/page
  • Manipulate print tickets using the Print Schema model classes
  • Save XPS documents as raster images
  • Save XPS documents to PDF format
  • Manipulate hyperlinks associated with XPS elements
  • Save PDF to stream
  • Manipulate, save and convert XPS outline items

Discontinuation of Aspose.XPS and Aspose.EPS

Since both Aspose.EPS and Aspose.XPS are going to be merged as one Aspose.Page API, they will be discontinued and removed from APIs’ catalog offered by Aspose. They will no longer be part of Aspose.Total package and no updates or revisions will going to be released for them. As per best compensation policy for customers who already have purchased licenses for Aspose.XPS and Aspose.EPS, they will be able to use Aspose.Page with their existing licenses. Please note that Aspose.Page will support existing licenses until they are expired. You will have to renew your license and get Aspose.Page license to keep using API without any limitation.

Release of the first version of the API depends upon internal components integration and performance tests. In case all integration tests are successful, we plan to roll out first version of Aspose.Page for .NET/Java during this month i.e. June. Along with testing the API and making it ready for its first release, we are also working over creating its official documentation and release notes. Similar to other Aspose APIs, you will surely have all resources available online i.e. documentation, guide to use API features, working demos written in C#, etc.

In order to keep yourself updated with the news on Aspose.Page for .NET/Java release, stay tuned with us. In case of any question or inquiry, you can please reach us over Aspose.Page Support Forum. We will be more than happy to entertain your queries accordingly.

Posted in Aspose.Page Product Family, Asad Ali | Leave a comment

Compress Metafiles, Read Macros from Document, Improved Table Style, and Convert Wide Cell to Horizontally Merged Cells

Share on FacebookTweet about this on TwitterShare on LinkedIn
Aspose.Words for .NET logo

Hi guys! We have added very interesting features for you in the new release of Aspose.Words for .NET 19.6. Reading macros from the document, control the behavior of compressing metafiles while saving document, working with table styles, and convert wide cell to horizontally merged cell.

Let me explain the detail of each feature one by one.

Compress Metafiles

When you save Word document using MS Word, all metafiles are compressed by default regardless of their size. However, Aspose.Words compresses big size metafiles only. The small size metafiles are not compressed for performance reason. Starting from Aspose.Words 19.6, we have added new feature to allow users to choose an appropriate behavior using new public property DocSaveOptions.AlwaysCompressMetafiles. All meta files are compressed regardless of its size when this property has true value. When false, small meta files are not compressed. Following code example shows how to use this property.

Read Macros from Document

In this release, we have added support to read the VBA project source code. We have added VbaProject, VbaModuleCollection, and VbaModule classes in this release. Below code example shows how to read VBA Macros from the document.

Working with Table Style

You can change the format of table using Table styles in MS Word. With table style, you can change the look of table e.g. border, shading, alignment, text font etc. In this release of Aspose.Words, new public properties have been added into the TableStyle class. We have implemented new public types ConditionalStyleCollection, ConditionalStyle, and ConditionalStyleType. Please read the following article for more detail.

Working with TableStyle

Added Public Method Table.ConvertToHorizontallyMergedCells

There are two well-known techniques used by MS Word to implement horizontally merged cells inside the table. The first one is the merge flags, like Cell.CellFormat.HorizontalMerge, but according to the latest MS Word behavior looks like this way is not used anymore and MS Word just does not write merge flags. Instead, MS Word uses another technique, where cells are merged horizontally by its width.

So, when cells are horizontally merged by its width – there are no merge flags and of course, there is no way to use merge flags to detect which cells are merged. So, we have added a new public method to convert cells which are horizontally merged by its width to the cell horizontally merged by flags. Please read the following article.

Convert To Horizontally Merged Cells

Obsolete methods Range.Replace removed

We have removed following Range.Replace methods in this release.

public int Replace(string pattern, string replacement)
public int Replace(string pattern, string replacement, FindReplaceOptions options)
public int Replace(Regex pattern, string replacement)
public int Replace(Regex pattern, string replacement, FindReplaceOptions options)

License.IsLicensed Marked as Obsolete

Starting from Aspose.Words 19.6, the License.IsLicensed property is marked as obsolete. We will remove it in later releases.

/// <summary>
/// Returns true if a valid license has been applied; false if the component is running in evaluation mode.
/// </summary>
[Obsolete("This property is obsolete. SetLicense() method raises an exception if license is invalid.")]
public bool IsLicensed

There are many other features, enhancement, and bug fixes included in this release. Please check the release notes of Aspose.Words for .NET 19.6.

When time allows you can check Aspose.Words’ API examples at Github, talk about this release and other API related issues in our forum.

Posted in Aspose.Words Product Family | Leave a comment

Template Merger with Aspose.HTML for .NET 19.5

Share on FacebookTweet about this on TwitterShare on LinkedIn

Your applications can have wonderful features with Aspose.HTML for .NET 19.5. This version lets you create and manipulate HTML documents even better. We have simplified the API to make it more user friendly as you are at the center of our development. For instance, we have prepared a specialized Aspose.Html.Converters.Converter object to unify all conversion scenarios available with Aspose.HTML library. Following is the sample code explaining how this can be utilized:


Template Merger

Another milestone achieved with this release is the feature of Template Merger. It enables you to create HTML documents based on different templates and populate them from various data sources. For example, you may now merge HTML with JSON or XML as per your requirements or preferences. Such features make Aspose.HTML for .NET API stand out among other options you may think about. Below is an example for merging HTML with JSON:

A more closer overview of this release can be found in Release Notes and working examples can be found in Example Project. We value and appreciate your participation in turning the API from good to great, so your feedback and suggestions are awaited in Aspose.HTML forum.

Posted in Aspose.HTML Product Family | Leave a comment

PSD cropping and new filters support included in Aspose.PSD

Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.PSD for .NET logoHello viewers! In today’s blog, I am back with giving you a walk through of latest Aspose.PSD for .NET 19.5 release. This is a relatively new product and we tend to include new features to it in every monthly release. In following section, I will be giving you an overview of new features along with sample examples for how to use them.

Support of Fill layers: Pattern

In Photoshop Creative Suite 6, one can apply preset patterns as fills. To fill a layer or selection with a preset pattern, one needs to select a layer in edit mode and set either preset or custom panel for selected panel.

Likewise, Aspose.PSD now also support setting for filling PSD layer with Pattern fill. For this, Aspose.PSD.FileFormats.Psd.Layers.FillLayer is used to add Pattern in PSD layer. In the following example, we have demonstrated loading of a PSD file, accessing the Filllayer class and setting the Pattern using the PatternFillSettings properties.

Support for new resources

Aspose.PSD for .NET now introduce support for working with resources like PtFlResource and VsmsResource. For this, one need to use PtFlResource and VsmsResource classes for resources available PSD layers. In following examples, we have demonstrated the use of PtFlResource and VsmsResource respectively.

You can check the official product release notes for many other issues and enhancement carried out in product as well. Here you can get the detail!

When time allows you can check out API examples at Github, talk about this release and other API related issues in our forum.

Posted in Aspose.PSD Product Family | Leave a comment