
TX Text Control .NET 15.0 introduced the page rendering engine that allows you to export a metafile or a bitmap of each separate page. This enables developers to create thumbnails of the pages or to export images to view them in a browser.
This sample shows how to create a multipage TIFF image from all pages of a document.
Two significant steps are required to create these images:
First, we need to iterate through all pages of TX Text Control to create separate TIFF images:
ArrayList inputImages = new ArrayList();
foreach (Page page in textControl1.GetPages())
{
MemoryStream image = new MemoryStream();
Bitmap mf = page.GetImage(100, TXTextControl.Page.PageContent.All);
mf.Save(image, ImageFormat.Tiff);
inputImages.Add(image);
}Each TIFF image is stored in a memory stream which is added to an ArrayList for an easier handling when combining them.
In a second step, the TIFF images are combined to a single image. Therefore, a new image is created in order to append all other images from the ArrayList to a new frame of the new image using the SaveAdd method.
As ever, we would be delighted to help you with this sample. Please contact the Support Department, if you have any questions about this sample. The sample requires Visual Studio 2008 and at least a TX Text Control .NET 15.0 trial version.