Guide for C#
Core Document Formats
Additional Features

C# TIFF - Scan TIFF Document Pages in C#.NET

Scan TIFF Document Pages in C#.NET Project with High Image Quality

Visual C#
Home > .NET Imaging SDK > C# > Scan Document to TIFF
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

Scan TIFF File Pages in C# Overview
With RasterEdge C#.NET imaging scanning and reading technologies, developers and end-users are able to adopt complete and robust C#.NET TIFF scanning solutions to scan TIFF document pages. Users can easily integrate .NET TIFF scanning library with your C# applications to create customized scanner interfaces in C# class, which can completely scan TIFF pages text, width, height, color and grayscale contents in high-speed.
Main tutorial sections on TIFF document pages scanning in C#.NET:
  • .NET TIFF file pages scanning features within C# application
  • How to start a C# project to scan TIFF document pages
  • Accurate C# class method on scanning TIFF pages with .NET Imaging Scanner tool
  • Comprehensive C# example code to scan TIFF document pages
  • More C#.NET TIFF document processing instructions
.NET TIFF Pages Scanning Features in C#
  • High performance C#.NET TIFF imaging scanning application support
  • Easy to build available customer scanner interfaces in C# class
  • Use .NET document scanning controls to scan TIFF document pages within C# Windows project
  • High-speed TIFF document pages scanning of text, color, grayscale, and black & white
  • Support simultaneous TIFF image capturing and provide programmable access to scanner features
  • Scan TIFF document pages to memory by using C#.NET document scanning technique
  • Capabilities of saving the scanned TIFF pages into JPEG, PNG, BMP or GIF images
  • Support storing scanned TIFF document pages to multi-page PDF or Word document in C#
C# Project to Scan TIFF Document Pages
Following guide displays how to a start and run a C# Windows application that allows users to scan TIFF file pages by using RasterEdge .NET Imaging Scanner. And Visual C# sample codes are provided for better support. If you are VB.NET developers or users, please go to how to scan TIFF document pages to memory in VB.NET.
  1. Run Microsoft Visual Studio (2005 or any later version);
  2. Create an accurate Windows project in C# programming language;
  3. Activate TIFF Image Add-on license to get licensed text file;
  4. Copy the created licensed text file to the "Debug" file under "bin" folder of the new created C# Windows project;
  5. Add .NET TIFF image references to your Visual C# applications;
    • RasterEdge.Imaging.Basic.dll
    • RasterEdge.Imaging.TIFF.dll
  6. Load the target TIFF file to your C# applications;
  7. Define following RasterEdge .NET Imaging using statements in C# project:
using System.IO;
using System.Drawing.Printing;
using RasterEdge.Imaging;
using RasterEdge.Imaging.Processing;
using RasterEdge.Imaging.MultipageTiff;
Method on Scanning TIFF File Pages in C#
Our C#.NET imaging SDK provides the advanced OCR technique and image & document scanning tools to users to scan and capture TIFF document pages to memory in full managed C# .NET API. Please use following C# method code for TIFF document pages scanning or use this API for your own TIFF scanner developing within Visual C# project.
public void TiffProcessorMerge(string TIFFInputFile1, string TIFFInputFile2, string TIFFOutputFile);
C# Sample Code to Scan TIFF Document Page
With the help of following full and available C# sample code, developers can finish TIFF document pages scanning in short time.
using System.IO;
using System.Drawing.Printing;
using RasterEdge.Imaging;
using RasterEdge.Imaging.Processing;
using RasterEdge.Imaging.MultipageTiff;

RasterEdgeImaging TIFF = new RasterEdgeImaging();
public class AcquisitionClass
{
private bool AcquireCanceled;
private Acquisition Acquisition = new Acquisition(this);
public void Scan()
{
AcquireCanceled = false;
Acquisition.AcquireCanceled += new EventHandler(OnAcquireCanceled);
Acquisition.AcquireFinished += new EventHandler(OnAcquireFinished);
Acquisition.ImageAcquired += new ImageAcquiredEventHandler(OnImageAcquired);
Device activeDevice = Acquisition.ShowSelectSource();
activeDevice.Acquire();
}
private void OnImageAcquired(object sender, AcquireEventArgs e)
{
if (e.Image != null)
{
TiffEncoder enc = new TiffEncoder(TiffCompression.Default, true);
FileStream fs = new FileStream("1.tif",FileMode.OpenOrCreate, FileAccess.ReadWrite);
enc.Save(fs, AtalaImage.FromBitmap(e.Image), null);
fs.Close();
}
}
private void OnAcquireCanceled(object sender, EventArgs e)
{
AcquireCanceled = true;
}
private void OnAcquireFinished(object sender, EventArgs e)
{
if (AcquireCanceled)
return;
TiffImageCollection col = new TiffImageCollection();
TiffDecoder dec = new TiffDecoder();
FileStream fs = new FileStream("1.tif", FileMode.Open, FileAccess.Read);
int frameCount = dec.GetFrameCount(fs);
fs.Close();
for(int i=0; i< frameCount; i++)
col.Add(new TiffImage("1.tif", i, TiffCompressionType.Auto));

FileStream outStream = new FileStream("1.tiff", FileMode.OpenOrCreate, FileAccess.ReadWrite);
TiffEncoder enc = new TiffEncoder();
enc.Save(outStream, col, null);
}
}
More C#.NET TIFF Image Processing Guidance
Our TIFF Processing SDK includes tools for TIFF image rotating, merging, compression, text extraction and more. It provides developers and end users everything they need to build and deploy powerful TIFF imaging solutions on almost any platform with speed and ease. And the full managed C#.NET code for these functions are provided for better guide.


Recommend this to Google+