Displaying the Individual Pages of a Multipage TIFF using ASP

This demo uses the csImageFile component to open a TIFF image and display a specified page. The code and formatting has been kept simple to make it easier to see how to use the component

The links below allow the user to navigate to the first, previous, next and last pages. The current page number and the total number of pages is shown, and our test image also displays the number for each page.

Page Number: 1 of 5

First

Previous

Next

Last

The example code can be downloaded but you must also have the trial csImageFile component installed for it to run. Here are the files.

Download the trial csImageFile component - csift.zip (4.5 MB)

Download the sample scripts - tifdemo.zip (39 KB)

Description of the demo code.

function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } function AcceptCookies() { createCookie("cookie-site","true",120); createCookie("cookie-tracking","true",120); createCookie("cookie-remarketing","true",120); document.getElementById("overlay").style.display = "none"; } ]]>

Cookies

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.