Navigation Menu

Skip to content

windygu/Aspose_Words_NET

 
 

Repository files navigation

##Aspose.Words for .NET Examples Repository

This package contains C# and VB.NET Example Projects for Aspose.Words for .NET.

Aspose.Words for .NET is a class library that enables your applications to perform a great range of document processing tasks. Aspose.Words supports DOC, DOCX, RTF, HTML, OpenDocument, PDF, XPS, EPUB and other formats. With Aspose.Words you can generate, modify, convert, render and print documents without utilizing Microsoft Word.

Using Aspose.Words for .NET in your project gives you the following benefits:

  • Rich Set of Features

  • No Microsoft Word Automation

  • Platform Independence

  • Performance and Scalability

  • Minimal Learning Curve

These example projects provide helpful demonstrations and code when using Aspose.Words for .NET. You will need to download Aspose.Words for .NET separately and it will work in evaluation mode.

 

Aspose.Words for .NET at a Glance

Aspose.Words Overview

Open Source Feel of Aspose.Words

Aspose.Words for .NET and Aspose.Words for Java are successful commercial products, but our philosophy is to develop them using our unique "open-source feel" approach. In other words, we at Aspose are extremely customer driven and this shows in:

  • Frequent releases (at least 1-2 a month).
  • Features are prioritized according to your requests.
  • Unlimited free technical support for anyone.
  • Helpful support in the forums and answers within 12-24 hours.
  • Live chat with experienced technical advisors.

We think that customers who use our products feel that they use an open source product because of the extent they can influence the project, but with the security of a fully committed talented team working on the project.

The Aspose.Words for .NET examples published here at GitHub is a part of the above effort.

##What's Included in this Examples Repository?

###Code

All examples are provided as separate projects in both C# and Visual Basic. Each example contains a Program.cs or Program.vb code file which contains the main entry point of the program.

ExampleDescription
AddWatermarkDemonstrates how to add a watermark to a Microsoft Word document.
AjaxGenerateDocThis example shows how invoke Aspose.Words to generate a Microsoft Word document when a user clicks a button or a link on a web page. The request to generate and the produced document are delivered using AJAX functionality in ASP.NET.
AppendDocumentShows how to join two Word documents together and control how they are joined.
ApplyCustomLogicToEmptyRegionsShows how to remove empty regions from a document after mail merge using custom logic
AutoFitTablesDemonstrates how to use the AutoFit function to fit tables to the page width or to content.
CheckFormatShows how to use FileFormatUtil to check input file formats and if they are supported by Aspose.Words.
CompressImagesCompresses all images in a document that are above the specified PPI.
CopyBookmarkedTextExtracts text from a bookmarked range and shows how to import it into a new document.
DocumentInDBDemonstrates loading and saving a document into a Microsoft Access Database for use in Aspose.Words.
DocumentPreviewAndPrintShows how to preview and print an Aspose.Words Document with a standard .NET Print Preview dialog.
ExamplesContains numerous small but fully working code snippets that are used within the documentation.
Excel2WordDemonstrates interoperability between Aspose.Words and Aspose.Cells by importing a worksheet into a word document.
ExtractContentProvides code to extract fully formatted content from a document between selected nodes.
ExtractContentBasedOnStylesExtracts content from a document based on styles.
FindAndHighlightFinds and highlights all instances of specified text in a document.
ImageColorFiltersSaves a document as a TIFF image using different compression settings.
ImageToPdfShows how to convert any common input image formats such as JPEG, PNG, TIFF and WMF to PDF.
ImportFootnotesFromHtmlShows how to round trip footnotes by providing code which imports footnotes from HTML.
ImportTableFromDataTableShows how to build a table in a Word document automatically from a .NET DataTable.
LINQtoXMLMailMergeShows how to use LINQ and mail merge functionality to easily merge data into a document.
LoadTxtDemonstrates how to import a .txt file into a new Aspose.Words Document.
MailMergeFormFieldsShows how to insert checkboxes and form fields during mail merge.
MulitpleDocsInMailMergeProduces a new document for every record generated during mail merge.
MulitplePagesOnSheetProvides code to print multiple pages from a Word document onto one sheet of paper.
NestedMailMergeShows how to easily merge data directly from a relational data source into a document by using Nested Mail Merge.
ProcessCommentsPrints information about the markup comments found in a input Word document.
RemoveBreaksDemonstrates how to remove page and section breaks from a document loaded into Aspose.Words.
RemoveEmptyRegionsShows how to easily remove mail merge regions from a document that were not merged with data.
RenderShapesShows to render shapes (Textbox, AutoShape, Graphics etc.) independently from the document to image.
ReplaceFieldsWithStaticTextProvides code to automatically convert all fields of a certain type to plain text (Ctrl+Shift+F9 in Word).
SaveAsMultipageTiffShows how to save a document with many pages into a multi-paged TIFF image.
SaveHtmlAndEmailDemonstrates converting a document to HTML for use in e-mail with the .NET Email API.
SaveMhtmlAndEmailShows how to use Aspose.Words to convert a document to MHTML and then e-mail using Aspose.Email for .NET
SilverlightViewerThis example demonstrates the integration of Aspose.Words for .NET and Document Toolkit, an XPS document viewer library for Silverlight.
SplitIntoHtmlPagesExports a word document into separate HTML articles based on heading styles.
UntangleRowBookmarksDemonstrates how to fix bookmarks if they are incorrectly loaded in table rows.
WindowsAzureDemonstrates how to use Aspose.Words for .NET in the cloud.
Word2HelpExpands on the SplitIntoHtmlPages example by producing fully named HTML articles from the source Word document.
XMLMailMergeShows how to perform mail merge from an XML datasource.
XpsPrintShows how to print an Aspose.Words Document using the XPS Print API.

###Data

  • Input Documents - Each example directory contains a Data directory which contains any input documents or files used in the example.
  • Northwind.mdb - Many examples use this Microsoft Access Database found under the "Database" directory for demonstrating merging data into documents.

###Output

  • Most examples will perform operations on documents and save them into the Data directory. This directory is found inside each of the examples e.g "(ExampleName)\CSharp\Data".
  • Other examples print output to the console.
  • Some examples may display print preview dialog and print to a specified printer.

###Help Material

For further details on setting up the examples and any requirements refer to the readme.txt found in the root of the repository.

##Download the Examples

Please Download the Aspose.Words for .NET Examples to try them at your end.

##How to use the Examples?

Firstly make sure that you have downloaded and installed the latest version of Aspose.Words for .NET. We recommend using the .MSI installer for fast installation and seamless integration with the examples.

Download the examples from the above link. The solution files for Microsoft Visual Studio 2005, 2008, 2010 and 2012 are provided with the examples.

Once downloaded you can open the examples by opening the appropriate solution file (.sln) according to the version of Visual Studio or your other development tool installed on your system:

  • Microsoft Visual Studio 2005 - Open Aspose.Words.Examples.2005.sln
  • Microsoft Visual Studio 2008 - Open Aspose.Words.Examples.2008.sln
  • Microsoft Visual Studio 2010 and Microsoft Visual Studio 2012 - Open Aspose.Words.Examples.2010.sln
  • MonoDevelop and SharpDevelop can open any version of the solutions above

The examples are sorted into folders and are ready to compile. To run, right click on the corresponding project:

  • Any version of Microsoft Visual Studio - Select Debug and Start New Instance
  • MonoDevelop - Select Run Item
  • SharpDevelop - Select Run Project

Support and Contribution

Feel free to comment on the samples provided, open issues, discussions and request more samples. We provide full support for this project.

You can contribute by reviewing and sending feedback by trying out new features as they are implemented, submit bugs reports and help us verify fixes as they are released.

What to do if I encounter a Problem or a Bug?

We provide full technical support to everyone, regardless of whether they have purchased a license, or are just evaluating the product. Please post a message on the Aspose.Words forum with a description of your issue and any input document/code. We will reply within 12-24 hours with some helpful feedback.

We fix all bugs reported to us and try to implement all features requested by customers. To submit a bug report or for any general inquries, please post a message in the Aspose.Words Forum.

##Contact Us

Releases

No releases published

Packages

No packages published

Languages

  • C# 50.8%
  • Visual Basic .NET 45.9%
  • HTML 3.3%