Guide for C#
Core Document Formats
Additional Features

C# Word - Print Word Document in C#.NET

Visual C# Codes for Printing Word Document within .NET Imaging SDK

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

Print Word Pages in C#.NET Summary
RasterEdge provides standard options to print Word document pages within .NET image and document printing SDK library in multiple Visual .NET programming platforms. Users that apply our Word document printing toolkit are competent to print single or a range of Word page(s) at the same time in C# project.
Related .net document control helps:
asp.net mvc pdf editor control: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
c# asp.net mvc document viewer: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
asp.net dicom library: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net view tiff images: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net edit pdf image using c#: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
c# asp.net excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
asp.net annotate pdf using c#: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
What's more, this full managed Word printer provides variable Word pages printing options, for example, you can choose only odd or even pages, specific pages and sections to be printed, decide to print Word pages in reverse order and even print multiple pages on one sheet of paper. All these operations can be achieved as long as you accurately integrate our Word printing components into your Visual C#.NET applications.
Nowadays, although there are so many printer manufacturers and printer models, if using our Word printer, users can easily realize the integration of Word document viewing, processing, saving and printing functions as well as shorten developing time.
If you want to get more detailed tips on how to print Word pages in C# program, you need to see following tutorials:
  • Outline of the Word document printer benefits in C# class
  • Clear and comprehensive steps on creating a Windows project to embed Word printing library in Visual C#
  • Method and sample code on defining the Word pages that will be printed in C# program
Outline of Word Printer Benefits in C#
  • Easy to create a C# Windows desktop application to integrate Word file pages printing controls
  • Mature API solutions for users to print single or multiple Word page(s) within a few seconds
  • Compatible with C#.NET document managing standard that allows users to specify a Word page to be printed
  • Able to print Word document pages in original or reverse order within entire C# code
  • Print more than one copy at the same time by entering the number of copies you want to print
  • Easy to print multiple pages on one sheet of paper by using our powerful Word printing tool in C#
C# Project to Print Word Document
This guide tells users how to create a C# Windows desktop application to print Word document supported by RasterEdge .NET Imaging SDK using Visual C# sample codes.
  1. You may create a C# project in Visual Studio 2005 firstly. Visual Studio 2008 and 2010 are also supported;
  2. Then, add RasterEdge.Imaging.Basic.dll and RasterEdge.Imaging.MSWordDocx.dll to your C# project reference;
  3. Later, activate DocImage SDK for .NET evaluation or production license and save "RasterEdgeLicense.txt" file to your defined route;
  4. Copy and paste your developer license to the C# project to efficiently run .NET Imaging DLLs;
  5. Call RasterEdge .NET Imaging SDK and Word Add-On namespace as displayed below:
using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.MSWordDocx;
Entire Method and Demo Code to Print Word Pages in C#
Following four parts show the complete method and sample code that will be needed if users adopt our C# Word printer. Within these solutions, users can print the current page or all pages of Word file.

C# Method to Print Word Document

Following method is provided for users to print all Word document pages at a time in C# application.
public void WordProcessorPrint(string WordInputFile, String Printer);

C# Class Code to Print Word Document

The following C# class code example demonstrates how to print all the Word document pages using the above method.
using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.MSWordDocx;


namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{
RasterEdgeImaging Word = new RasterEdgeImaging();

public void WordProcessorExtractTextPage();
{
RasterEdgeImaging Word = new RasterEdgeImaging();

public void WordProcessorPrint();
{
WordInputFile = (@"C:/1.docx");
Printer = (@"C:/ HP Color LaserJet Pro M1213nf");
};
Word. WordProcessorPrint(@"C:/1.docx", @"C:/ HP Color LaserJet Pro M1213nf");
}

}
}

C# Method to Print Certain Page(s) of Word

C# method below is designed to help users print single or multiple certain Word page(s). In addition, other Word printing functions are also available within C# Word Printer Add-on , like printing multiple Word pages at one paper, setting the page copy numbers to be printed, etc.
public void WordProcessorPrint(string WordInputFile, int WordPageNumberStart, int WordPageNumberStop, string Printer);

C# Class Code to Print Certain Page(s) of Word

The following C# class code example demonstrates how to print defined pages of Word document using above method.
using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.MSWordDocx;


namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{
RasterEdgeImaging Word = new RasterEdgeImaging();

public void WordProcessorPrint();
{
WordInputFile = (@"C:/1.docx");
WordPageNumberStart = "1";
WordPageNumberStop = "4";
Printer = (@"C:/ HP Color LaserJet Pro M1213nf");
};
Word. WordProcessorPrint(@"C:/1.docx", "0","4", @"C:/ HP Color LaserJet Pro M1213nf");
}

}
}


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster Edge.com