If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!
> .NET Imaging SDK
> Save and Print Image
C#.NET Imaging Saving & Printing Overview
RasterEdge .NET Imaging SDK is a pre-configured, high-end image and document toolkit designed to offer fast, high-end image and document viewing, manipulation, saving, printing and scanning solutions without the need to download any additional controls on end-user side. RasterEdge .NET Imaging SDK also can be employed to streamline image and document processing for a wide variety of industries and document types. The .NET applications can integrate RasterEdge .NET Imaging SDK are Windows Forms, ASP.NET, ASP.NET MVC, C#.NET , VB.NET, vb6, Delphi, etc.
Rich functions are provided for Visual C#.NET developers to save customized images as black and white, grayscale or color images with appropriate settings. Windows printing is also supported if you have installed a valid Windows printer driver.
In this C# image saving and printing guide article, users can learn:
- Benefit list of image saving and printing in C#.NET
- How to create a C#.NET application for image and document saving and printing
- Methods to save image and document files in C#.NET Project
- Method to print image and document files in C#.NET class
C#.NET Image Saving and Printing Features
- Completely free C# code for image and document saving and printing
- Easy to save as single page documents within C# code
- Easy to save as multi-page file formats
- Use C# code to save image as black and white, grayscale or color image
- Use C# code to save image into disk or project memory as you wish
- Support for single or multi-page printing
- Include normal and fast image printing in C#.NET project
- Support for low-resolution or high-resolution printing
- C# code for saving customized images & documents into 30+ formats
Image Saving & Printing in C#.NET
This guide describes how to save and print images or documents using RasterEdge .NET Imaging SDK with Visual C# sample codes. As showed in the following guide tips, users need to create a C#.NET Windows application in Visual Studio 2005 or greater versions.
- Start Visual Studio 2005 and create a C#.NET Windows Application;
- After you created a project in Visual Studio, you may add the following RasterEdge DocImage SDK for .NET assemblies to your C# project reference;
Activate .NET Imaging SDK license as required;Add following using statements of RasterEdge DocImage SDK for .NET.
- RasterEdge.Imaging.Basic.dll & RasterEdge.Imaging.Basic.Codec.dll
Methods to Save Files in C#.NET Project
As a premier image and document management library vendor, RasterEdge aims at developing the most complete and robust document imaging APIs for C#.NET users to write customized imaging functions. Following saving methods are used for saving REImage to file, stream or byte array in C#.NET windows and web applications.
public byte Save(ImageType targetType);
public void Save(ImageType targetType, Stream stream);
public void Save(ImageType targetType, string filePath);
Method to Print Image in C#.NET Project
Except for methods for saving image and document, method for printing image and document files is also available by using RasterEdge C#.NET Imaging SDK. If you have installed the valid Windows printer devices, following printing method can be applied to your application directly and efficiently.
Public Print(int ImageID);
Entire C# Code for Image Saving
The following Visual C# class code demonstrates how to save an image. And our main supported image formats are: gif, bmp, png, jpeg and tiff.
// invoke this method only once at the beginning of your code register all assemblies you referenced to your project
string fileName = "c:/Sample.png";
string destinationFilePath = "c:/destn.png";
REImage reImage = new REImage(fileName);
MemoryStream stream = new MemoryStream();
// save image to the stream
// save image to file
Find more user guides with RasteEdge .NET Image SDK using Visual C# sample codings!
Want to install Imaging SDK in Winforms or Web applications, please go to Use Imaging SDK in Winforms
and Web Document Image Viewer
Recommend this to Google+