DISCUSS ANYTHING & EVERYTHING: Money, Dating, Health, Internet, Legal, Jobs, People, Places and more

Sponsored Links

Members Login
Username 
 
Password 
    Remember Me  
Chatbox
Please log in to join the chat!
Post Info TOPIC: How to convert Word files to XPS format in 3 easy steps
how to convert PDF to XPS like this way ? [0 vote(s)]

c#
0.0%
Spire.PDF 2.8.
0.0%


Newbie

Status: Offline
Posts: 1
Date:
How to convert Word files to XPS format in 3 easy steps
Permalink   
 


XPS, as a new document format released by Windows vista, is an alternative to represent document in electronic format beside PDF by adobe. XPS not only owns functions for document of viewing, printing and archiving, but also be applied as a specific file format for storing all document types. All the features make XPS a very good format and that is why many companies choose XPS as a principal format in document workflow. At present, a various types of converters ,like Word to XPS, are available in the market due to different needs .If you want Word to XPS, you will know how often you may need to download Word to XPS converter .

Do you believe that conversion from Word to XPS can be achieved only by copying a string of codes? Also do you believe documents created in other formats can be converted to XPS in only 3 steps without any help of converter? What we offer is a fast, easy and smart solution for you to convert Word to XPS in Spire.DOC. In addition, we will also show you the way how we convert PDF to XPS in Spire.PDF 2.8.After experiencing the methods in the following, you will know how efficient and effective they work. Here is how you can do this in 3 easy steps:

 

 

Procedure of Converting Word to XPS

Step 1.Create a new project

  1. Please create a new project in Visual Studio, and choose Console application.
  2. Set the Target framework to be .NET Framework 2.0 in properties

Step2.Add reference

  1. Add Spire.Doc as a reference
  2.  Add using at the top of the method .See below:

C# Code:

             //doc file

            String file = @”..\..\..\..\..\..\Data\Sample.doc”;

            //open doc document

            Document doc = new Document(file);

            //convert to xps file.

            doc.SaveToFile(@”d:\doc to xps\Sample.xps”, FileFormat.XPS);

        }

    }

}

Step3. Convert Word to XPS

 C# Code:

 using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using Spire.Doc;

namespace Doc_to_xps

{

    class Program

    {

        static void Main(string[] args)

        {

            //doc file

            String file = @”d:\doc to xps\doc.docx”;

            //open doc document

            Document doc = new Document(file);

            //convert to xps file.

            doc.SaveToFile(@”d:\doc to xps\Sample.xps”, FileFormat.XPS);

        }

    }

}

Preview

1.  Image before converting :

2.Image after converting


All features can be found here, please visit:

http://www.e-iceblue.com/Introduce/word-for-net-introduce.html



__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us