Docentric Toolkit 4.1 released

Another major release Docentric Toolkit is here! For the last several months we have been working hard to implement many features that you requested and also killed many bugs that have still been lurking throughout the toolkit. While the highlight of this release is the new Printing API there are many other improvements that were included in the new release.

BLOG_Release4.0_PrintApi

Client and Server side Printing

While printing from code was possible in the previous versions of Docentric Toolkit it was tedious and limited. Since one of the supported output formats was XPS you were able to employ System.Printing WPF classes to print documents.

But using WPF APIs to print an XPS document is quite a demanding task and such a code should (according to Microsoft) not run as part of a non-desktop application (ASP.NET, Windows Servis). Microsoft clearly says that neither the System.Printing nor System.Drawing.Printing namespace APIs can be used for server side printing. This effectively means that .NET developers do not have a managed printing API that can be safely used for server side printing. The only way is to go the Win32 way.

And that is exactly what we have done in Docentric Toolkit. We implemented our printing APIs using Win32 printing API which mans that you can use the new Print methods not just on client but also on server side, be it a WPF, ASP.NET application or Windows Service. And it is also very easy to use them:

Note that there are different overloads of the Print method accepting various printing options.

Faster PDF rendering and conversion

We improved PDF rendering speed several times in the past. In this release we managed to make the engine even faster. Big time faster! To give you a more general feeling about how fast the PDF rendering engine now is I can tell you that saving a document to PDF with Docentric Toolkit is now approximately 30% faster than MS Word’s Save to PDF operation.

Since the performance varies from a document to a document I’m not providing any benchmark tests here. But in general you will notice performance gain at least 2x. Anyway, the best way to see how much faster the engine now is is to try it yourself with your documents in your scenarios.

Improved PDF rendering fidelity

There are many new features that are supported in the new release. While there is a lot of small corrections that will reflect in a better fidelity in general some of them are bigger improvements and deserve their own space in this article.

Drawing Canvas and Shape Group

Both are a standard feature in MS Word and are now properly rendered when saving to PDF or XPS:

Shape Effects and Linear Gradient Brush

MS Word allows you to apply many different effects that can be applied to a shape. We added support for the Outer Glow and Outer Shaddow effects. Shapes can now also specify Linear Gradient Brush as a background fill and will be properly rendered when saving to PDF or XPS (See the image above).

New Size Mode for the Image tagging element

This is an Add-In for MS Word improvement. You have been able to use the Size Mode property for an Image tag to specify how the picture size will be determined in the generated document. So far you have had quite a lot of different options to choose from but there was no way to specify a picture size that would be of the source image size while constrained with the placeholder’s size. Now there is a new option that will allow you to cover exactly this scenario.

BLOG_Release4.0_NewSizeMode

When selecting this option for an Image tagging element the rendered image will have its original size as long as it fits in the boundary box of its placeholder in the template. Just like the Use Image Size option. The difference kicks in when the image size is bigger than the placeholder. In such case the rendered image size will be of the placeholder size while retaining its aspect ratio.

About the Author
Jure Leskovec

Leave a Reply