The Tagged Image File Format (TIFF) format is used by many scanning applications, publishing and layout applications and scanners and fax machines. Many scanners create multipage documents automatically when scanning documents.
TX Text Control directly supports the insertion of TIFF images using the ImageCollection class. This sample shows how to split multipage TIFF images first in order to insert them into new pages. Each image is inserted on a new section page that matches the size of the image.
The following method splits a multipage TIFF into single TIFF images that are returned as a list of images:
The next method iterates through the list of images and creates a new section page for each image. The page size will be adapted to the image size and the margins are being set to 0,0, so that the images fit perfectly into each page.
This method makes it very easy to combine different documents into one single document including PDF files, multipage TIFF files and other supported documents.
Download the sample from GitHub and test it on your own.
Download and Fork This Sample on GitHub
We proudly host our sample code on GitHub.com/TextControl.
Please fork and contribute.
Requirements for This Sample
- Visual Studio 2012 or better
- TX Text Control .NET for Windows Forms (trial sufficient)