Atalasoft
Welcome to Atalasoft Community Sign in | Join | Help
in

Multi-Page Tiff Viewer Control

Last post 05 Apr 2007, 5:03 PM by vinny950. 2 replies.
Sort Posts: Previous Next
  •  15 Feb 2007, 11:48 PM 11473

    Multi-Page Tiff Viewer Control

    I have created a small control library useful for efficiently viewing and editing multipage TIFF documents.  This control displays all pages in a multi-page document in the thumbnail view on the left, and the main full size image that is viewed when the user clicks on the thumbnail to the left.  It stores a temporary file cache containing a multi-page TIFF and edits are made to this TIFF in-place using our TiffFile functionality.  Manipulating an image will update the thumbnail, and update the file cache.  The thumbnail and image viewer are linked via events.  This control is great to use when scanning in a batch of documents as you do not need to have each image in memory at the same time, yet it displays each page as a thumbnails nicely and quickly.  It can be used to view and edit a document with many (hundreds) of pages with a save to TIFF simply copying the TiffFile cache. 

    I've attached source code for this control which has references to DotImage 5.0 Beta (can be used just as well with DotImage 4.0). 

    This is an extension to our DotImage Document Imaging SDK, and not officially supported.  Please post any questions about this control to this thread. 

    Enjoy!


    Bill Bither
    Atalasoft
    Filed under:
  •  24 Mar 2007, 8:14 PM 11728 in reply to 11473

    Re: Multi-Page Tiff Viewer Control

    There's a bug in the attached project.  After line 121 in UpdateableTiffFile.cs, add this line of code:

    fs.Seek(0, SeekOrigin.Begin);


    Bill Bither
    Atalasoft
  •  05 Apr 2007, 5:03 PM 11801 in reply to 11728

    Re: Multi-Page Tiff Viewer Control

    Hey bill

    Thanks for the code-I inherited your updateableTiffFile.cs to use on my application.Here is my problem.

    When I select the first thumbnail, it appeared on the workspaceviewer as I expected but when I select the second thumnail I expect the first one to dissappear on the worspaceviewer and the selected to appear but I get this error

     

    Argumentoutofrangeexpection--in the following line

       

    this.workspaceViewer1.Open(_simpleTiffFile.CacheFilename, _currentFrame);

    with following (height must be greater than 0, parameter name height.

     

    here is my code on selectedindex changed event

    private void thumbScans_SelectedIndexChanged(object sender, System.EventArgs e)

    {

    if (thumbScans.SelectedIndices.Length > 0 && thumbScans.SelectedIndices[0] != _currentFrame)

    {

     

    _currentFrame = thumbScans.SelectedIndices[0];

     

     

    this.workspaceViewer1.Open(_simpleTiffFile.CacheFilename, _currentFrame);

    this.workspaceViewer1.Undos.Clear();

    OnSelectedImageChanged(EventArgs.Empty);

    }

     

    }

    any solution

    thanks in advance

View as RSS news feed in XML