View messages from desired folders in Outlook Data Files (OST/PST)

Hello everyone! Today, I am quite excited to announce that GroupDocs.Viewer for Java 19.8 has been released with 20+ new features, improvements, and bug fixes. Although every new feature in this version has its own importance, I have picked a few interesting but useful features for you. So in this post, I am going to give you an overview of how to work with the folders contained by Outlook Data Files (OST/PST) and use the message filters to render selective Outlook messages.

In the previous versions of the API, we already have the feature of rendering all the messages from the Outlook Data Files. But there could be the case when you need to render the messages from a specified folder. Also, what if you want to render the only messages you have received from a particular email address? These are the questions that I’ll answer today.

First of all, let me give you a brief overview of the Outlook Data Files and the message folders.

The Outlook uses OST and PST files to store the local copy of all the information when you set up your email account. Have a look at how Microsoft defines both of these data files:

Outlook Data File (.pst) – An Outlook Data File (.pst) contains your messages and other Outlook items and is saved on your computer.

Offline Outlook Data File (.ost) – Most other account types, such as IMAP accounts, Office 365 accounts, Exchange accounts, and accounts use an Offline Outlook Data File (.ost) file to store a synchronized copy of your mailbox information on your local computer.
(read more)


Now let’s come to the Outlook folders. MS Outlook manages your messages in different folders such as Inbox for incoming messages, Sent items for the messages you send and so on. Along with the default message folders, you can also create new folders to organize the messages in the way you want. For example, you can create a separate folder to keep the messages from a particular organization or a person. Have a look at the following image which shows different folders in the Outlook:

Now you would have got the idea of Outlook Data Files and the folder they contain. Let’s move on to the features that we have introduced to deal with the Outlook folders and the messages.

Retrieving the list of Outlook folders

Before rendering the messages from a specific folder, you must know the names of all the folders the data file contains. Once you have got the list, you can select a folder and render the messages from it. For this, the API provides OutlookDocumentInfoContainer.getFolders() method which returns a list of the folder names. This is how you can do it using the code:

There might be the case when you want to get the list of subfolders from a specific folder e.g. Inbox. In that case, you just need to specify the folder’s name using DocumentInfoOptions.getOutlookOptions().setFolderName() and the rest of the code will remain the same.

Rendering messages from a specified folder

Now when you have got the list of the folders, you can render the messages from a particular folder. This is again as easy as pie. Just mention the folder’s name in the HtmlOptions or ImageOptions and call getPages() method. Have a look at the complete code:

In case you want to render the folder’s content as a PDF document, you will specify the folder’s name in PdfFileOptions and call the getPdfFile() method (as shown below).

This is what you would get in the rendering result:

Filtering messages to be rendered

Another important feature we have introduced is filtering the messages that you want to render. With this feature, you can select the messages by applying the following filters:

  • Text filter – To filter messages by subject and content of the message.
  • Address Filter – To filter messages by sender’s and recipient’s email addresses.

You can set these filters using setTextFilter() and setAddressFilter() methods of HtmlOptions, ImageOptions, and PdfFileOptions classes. Suppose, you want to render all the messages that contain the word ‘Susan’ in the subject or the body. In that case, you will set the text filter to ‘Susan’ in the following way:

Similarly, you can apply the address filter to get the messages based on the sender’s or the recipient’s email address.

Well, you have seen how easy it is to view the folders as well as the messages from the Outlook Data Files using GroupDocs.Viewer for Java 19.8. This is it from my side. For a full list of new features, improvements, and fixes, please have a look at the release notes. Try out the API features yourself by downloading and running the examples project. For more details on each feature of the API, have a look at the documentation.

As always we look forward to connecting with you via the GroupDocs Forum.

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted in GroupDocs.Viewer Product Family | Tagged , , , , | Leave a comment

Join Images using GroupDocs.Merger for Java 19.8

With the new release of GroupDocs.Merger for Java 19.8 you can take your document joining experience to the next level.
What is special about this release?
We are pleased to announce that you can now do image joining. And following are the supported image formats:

  • BMP
  • PNG
  • TIFF

How easy is that?
Let’s understand this with a use-case. We’ll join a BMP and TIFF file.

New Format Support
API now fully supports HTML format.

We’d recommend you to download the latest release and integrate it in your application. In case you find any issue, feel free to post on forum.

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted in GroupDocs.Merger Product Family | Tagged | Leave a comment

It’s Time to Upgrade to GroupDocs.Viewer for .NET v19.8

GroupDocs.Viewer for .NET has been serving the developers in creating the document viewer applications for many years. With the efforts of our hard-working team and the support of our valuable customers, we are able to make the API stand among the top-ranked document viewer APIs. Since the Sky is the only limit, we always keep on enriching the API with more features, improving its performance, and making its usage easier for the developers. And today, I am excited to announce that we have introduced a new public API for GroupDocs.Viewer for .NET with major improvements.

In the latest version of the API (v19.8), we’ve improved the architecture of the API to simplify its usage and make it even easier to build applications. With the major product optimization, the API now consumes fewer resources as compared to the previous versions. Whereas, the document rendering speed has been improved significantly.

Let me give you a few reasons why you should switch to the v19.8 of GroupDocs.Viewer for .NET.

  • Memory usage – Significantly improved and optimized API’s memory usage (from 10% to 400% approx. depending on the document type ).
  • Improved rendering speed – The overall rendering speed has been improved remarkably. 
  • Code optimization – Optimized public API to make it even more intuitive and simple (with only a few lines of code you will be able to perform any action which required 20+ lines of code in the previous version).
  • Single entry point – A single class to manage the document rendering process for any supported file format.
  • Easy to use – API now gives more options to the developer in terms of usage and creativity.

With the major updates, the public API of GroupDocs.Viewer for .NET has undergone significant changes. As a result, the usage of the classes and their properties and functions has also been changed. Let’s now check the difference between the coding styles of the new and old version of the API.

This is how we used to get the HTML representation of the document with embedded resources using the old version:

Now, have a look at how we can perform the same operation using the new API.

Have you noticed that the code has been shrunk significantly to fewer lines of code in the coding style of the new API? Also, you don’t have to create separate handlers for HTML and image representation. Instead, just create a Viewer class and control its behavior using the classes that extend ViewOptions i.e. HtmlViewOptions, PngViewOptions and so on.

Now, as a developer, it is obvious that you would think about how would you deal with breaking changes in code after upgrading to the version which contains the major updates. So let me make it easier for you. In the latest version, the legacy API has been moved into the Legacy namespace. Therefore, after you upgrade to version 19.8, it is required to make project-wide replacement of namespaces only. This means that the namespaces will be changed from GroupDocs.Viewer.* to GroupDocs.Viewer.Legacy.* to resolve build issues. And that’s it!

Alright! So now, its time to switch to the latest version. I would recommend you to first explore the documentation of the new API with the help of the source code examples. Once you try it yourself, you will get a better idea of how useful it’ll be for you to switch to the latest version. You can also consult the release notes as well as the migration notes.

In case you would find the migration process difficult for you, feel free to post on our forum.

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted in GroupDocs.Viewer Product Family | Tagged , , , , , , , , , , | Leave a comment

Adding Ellipse Annotation in a PDF Document

GroupDocs.Annotation API

GroupDocs.Annotation comes with an extensive set of tools that you can use to easily add common shapes to your documents as an annotation. The list of tools is not limited to area, point, text, polyline, etc. In this section, we will primarily discuss how the Ellipse annotation could be added in a PDF document by using GroupDocs.Annotation API.

Adding Ellipse Annotation

While discussing the family of annotation types, we cannot ignore ellipse annotation. It could be regarded as a multi-purposed annotation type. For example, it could be used to display extra information on your graphs or you can use it to circle important information. AnnotationInfo could be used to set color, page, opacity, creator name and many more. At minimum following two properties of AnnotationInfo have to be set for drawing an ellipse, which determine the size and type of the annotation:

Fixed valueAnnotationType.Ellipse is always used as Type for adding an Ellipse Annotation.

Code Example for a PDF Document

For adding ellipse to a PDF document, first we will need to get the document in form of Stream by using following line of code:

Then the Ellipse annotation is added to the list of annotations:
Finally, we will export the annotation and save the output file:
This way we have added an Ellipse annotation to our PDF document using GroupDocs.Annotation API.

The complete C# code will look like this:

The code in Java will look like this:
After adding Ellipse annotation the output document will looks like following screenshot:

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted in GroupDocs.Annotation Product Family | Tagged , , , | Leave a comment

Searching in a Large Number of Documents

Usually, a searching software is able to achieve fast search responses because, instead of searching the text directly, it searches an index. This would be the equivalent of retrieving pages in a book related to a keyword by searching the index at the back of a book, as opposed to searching the words in each page of the book.

Using GroupDocs.Search for Indexing and Searching

Problem: Suppose you have 10 million documents of different file formats, e.g. MS Word, Spreadsheets, Presentations, etc. Due to limited memory size, you cannot store more than 5% of the entire data. Now the main issue is how to apply indexing and searching in this case.

Solution: The GroupDocs.Search for .NET provides many ways to perform search operations on any size of document collections. It is capable in indexing various types of documents and perform searches on it. The API supports searching for:

  • Text occurrences
  • Basic metadata fields
  • File names
  • Document types

Moreover, it allows searching on the basis of different search query types. The advanced search (e.g fuzzy search, synonyms search, boolean search) is also supported.

Creating Index

Let’s try the GroupDocs.Search API for indexing the bulk of documents of different file formats(see the supported formats list). Although, the Index can be created in memory, but here, let’s create it on disk. You just need to follow these simple steps:

  • Create a directory for Indexing
  • Create another directory and copy all the required documents into it.
  • Come to the code and firstly initialize Index object by passing the path of the index directory
  • Add documents using AddToIndex(“Documents_Folder_Path”) method of Index object.

The C# code will look like this:

Java guys can write the code like this:

After creating Index you will see the files in the Index folder like following screenshot:

Searching The Terms

The GroupDocs.Search allows various kinds of queries for search operations with more advance features. Please see this article for the detail.

Lets come to the code.

Suppose, the index has been already created as described in the above section. Let’s simply search a term. Follow the steps as written below:

  • Instantiate Index by passing index folder path
  • Search the term using Index.Search() method which will return SearchResults object.
  • Show list of searched files

The C# code will look like:

Java developers can write the code like this:

The output will be appeared like the following screenshot:

The complete ready to run code sample is available on GitHub.

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted in GroupDocs.Search Product Family | Tagged , , , , , , , , | Leave a comment

Add Ellipse Annotation in Multiple Documents

We are always keen to make our APIs rich in features and enhance usability. When we talk about annotation types. One cannot neglect ellipse annotation. Its a multi purposed annotation type. For instance you can use it to display extra information on your gauge or capture graph hits against a target line. Previously, Ellipse annotation was implemented in .NET version and it seemed very useful. We are pleased to announce that Ellipse annotation is now added in GroupDocs.Annotation for Java 19.7. Java users can implement this annotation as follows:

This is how ellipse annotation will look like:

You can also set ellipse color, pen style (e.g. dash, dot, solid), pen width. AnnotationInfo class gives you access to such properties.
You might be wondering, what documents are actually supported for the ellipse annotation? Currently, this annotation is supported for the following file formats only:

  • PDF
  • Word
  • Slide
  • Image
  • Cell
  • Diagram

Setting Watermarks Angle
We’ve added ability to set text watermark angle. The process is same as adding Watermark annotation, but you should additionally set Watermark rotation angle by setting AnnotationInfo.Angle property (in degrees).

Aside new features, we’ve also fixed some bugs:

  • Only first page is saved in output when Multi-Tiff file is annotated
  • Import annotations for Images doesn’t close stream
  • Annotation not apply if page number not defined in Words

We’d recommend you to download and integrate latest release of the API and share your concerns on forum.

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted in GroupDocs.Annotation Product Family | Tagged | Leave a comment

Restart the List Numbering Dynamically within Your Document

Nested or the multi-level numbered lists allow you to group the items based on the parent item. Put it simply, you can separately list the items under each group. This becomes very useful when you have to list the items having multiple sub-items. Let’s have a look at the following figure which makes it simpler to understand the scenario.

In this figure, you can observe that there are listed 3 groups and each group further has multiple items listed under it. So, in such cases nested numbered list is used.

Lets now check out how could you populate a numbered list within your Word documents using GroupDocs.Assembly. Assume that you have the Order and Service classes defined in your application in such a way that each order instance has multiple services. The following template will be used to output the orders along with the services they have using the API:

The Word document that will be generated in the result of the above template will contain the following listing:

The perfect output, isn’t it? No, not at all. You would have noticed that the numbering of the list is disturbed. Yes, the numbering sequence is continued and it hasn’t restarted for the second list. Well, this is the expected behavior when you generate the numbered list using this template.

So how would you deal with such a situation when you want to restart the list’s numbering? Well, believe me, it is as simple as a pie. Just place a restartNum tag before the inner foreach and you are done.

This is how the updated version of the template will look like. We have now placed restartNum tag to restart the list numbering for each order.

And what we have got in the output is:


At the moment, you can restart the list numbering within the Word Processing documents as well as email messages with HTML and RTF bodies.

So if you want to have this feature in your application, just download and integrate v19.7 of GroupDocs.Assembly for .NET or Java. For working code samples, download or clone the examples project from the GitHub repository. Cheers!

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted in GroupDocs.Assembly Product Family | Tagged , , , , , , , , , , , | Leave a comment

Control Documents Comparison Sensitivity

Integrate GroupDocs.Comparison for .NET 19.6 in your project and take control of documents comparison sensitivity. Detecting source and target documents style changes or inserted/deleted items and then highlighting them in the resultant file is a common yet major feature.

But we have something new, something enormous for you. You can now get detailed comparison of the documents. In ComparisonSettings class we added SensitivityOfComparison method using that you can set sensitivity of documents comparison. Let’s see its implementation and then details.

This option defines limit in percentage, when element is detected as deleted or inserted. There are three values/percentages.

Minimal value
Minimal value is 0, comparison process does not occur for any length of sequences of two compared objects.

Value by default
The default percentage is 75, comparison occurs when the percentage of deleted or inserted elements in relation to all elements does not exceed 75%.

Maximum value
That is 100%. Comparison occurs at any length of a common sub-sequence of two compared objects.

Now let’s understand this with a use-case. Suppose we have two words:

  1. oneSource
  2. twoTarget

These two words have very small common sub-sequence. Therefore, when comparing them at 75% accuracy, it is not taken into account and we get a completely removed and inserted word as follows:


But at 100% accuracy, this sub-sequence will be treated or represented in a different way, despite the fact that it consists of two letters.


Isn’t it amazing? You can now get briefed comparison results by just controlling the sensitivity.

Let’s see the major issues that are now resolved in this release:

  • Duplicate Images in Result file in PDF
  • PDF comparison has overlapping and mangled output
  • Text got overlapped with other text or images
  • Merged Documents and then comparing them fails

You must give a try to GroupDocs.Comparison for .NET API and share your feedback and concerns on forum. Download latest version of the API here.

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted in GroupDocs.Comparison Product Family | Tagged | Leave a comment

Get Image Representation of Document Pages

Getting image representation of document pages is one of the most successful feature that is already implemented in .NET version of the API. Keeping your interest in view, we’ve now implemented this feature for Java developers. GroupDocs.Comparison for Java 19.6 allows you to save document comparison results in image format as well.
What does it take to implement such a feature?
You just have to pass the output folder path to convertToImages method and API will take care of conversion mechanism itself.
Let’s have a look at the implementation:

Is there a way to set document size when comparing image with different formats?
We added a class OriginalSize using that you can set document size when comparing image with different formats, this size will be used when document is converted to the picture. Given below are the methods:

  • getHeight()
  • getWidth()
  • setHeight(int value)
  • setWidth(int value)

There are also bug fixes and improvements introduced in this release. Let’s have a look at the prominent ones.

Bug Fixes

  • Font detection exception
  • Word separation exception
  • Html MarkDeletedInsertedContentDeep Bug
  • Deleted items in comparison output is not as expected
  • Incorrect difference info in PDF


  • Improve HTML aligner
  • TableFormatSetter for Slides is improved now
  • Html Anchors comparing
  • StyleSheet Comparer for Html

We’d recommend you to download and integrate this release in your project and enhance your document comparison experience. Do share your feedback or concerns on forum.

Share on FacebookTweet about this on TwitterShare on LinkedIn
Posted in GroupDocs.Comparison Product Family | Tagged | Leave a comment