Javascript multipage TIFF example - Using csXImage clientside to view and edit TIFF images

The ActiveX control csXImage.ocx includes a comprehensive set of functions for reading and creating multi-page TIFF files. This demo shows some of the key features used in a Javascript application (a clientside web application).

This application consists of a single web page containing an instance of csXImage and some command buttons. The formatting has been kept to a minimum to make it easier to understand.

The csXImage control is used either to load a multi-page TIFF file from disk or scan multiple pages from a scanner with document feeder (ADF). Some simple edits can be carried out on the pages including rotating, cropping or despeckling before saving the file.

The page includes several buttons which are enabled or disabled as appropriate. Initially only the 'Scan Pages' and 'Open File' buttons are available. 'Scan Pages' will use the TWAIN scanning functions in csXImage to acquire several pages from a scanner with document feeder. 'Open File' will allow the user to browse for a file to open from the local disk.

The images read from file or acquired from the scanner are stored in an array 'Pages' using the WriteBinary command. The Prev and Next buttons step through the images, displaying one at a time.

The images can be saved to disk as a multi-page TIFF file at any time using the 'Save File' button. Although not shown in this demo, csXImage also includes equivalent functions for saving multi-page PDF files.

The remaining buttons allow the currently displayed page to be edited. These edit functions are just a small selection of the many functions available in csXImage.

A longer description of this demo is provided in the ReadMe.txt file included in the download.

To run the demo you need the csXImage trial ocx control installed on your system as well as MS Internet Explorer. The trial control and the example file are available below:

Download the trial csXImage control - csXImageTrial.exe (3.6 MB)

The example web page - (3 KB)

More on using csXImage as a clientside control in the browser.


This site uses cookies for functionality, traffic analysis and for targeted advertising. Click the Accept button to accept our Cookie Policy. The Cookie Policy page offers configuration for a reduced set of cookies for this site.