Tuesday, 05 April 2011 07:42

PDF Graphics Transparency in C#, VB.NET

The sample shows the different modes of transparency.

Download Transparency.pdf

Published in Drawing
Tuesday, 05 April 2011 07:27

PDF Barcode in C#, VB.NET

The sample demonstrates how to draw barcode in PDF document.

Download Barcode.pdf

Published in Drawing
Tuesday, 05 April 2011 07:21

PDF DrawImage in C#, VB.NET

The sample demonstrates how to draw image in PDF document.

Download DrawImage.pdf

Published in Drawing
Tuesday, 05 April 2011 07:19

PDF DrawShape in C#, VB.NET

The sample demonstrates how to draw shape to a PDF document.

Download DrawShape.pdf

Published in Drawing
Tuesday, 05 April 2011 07:12

PDF DrawText in C#, VB.NET

The sample demonstrates how to draw text to a PDF document.

Download DrawText.pdf

Published in Drawing
Tuesday, 05 April 2011 06:47

PDF Image in C#, VB.NET

The sample demonstrates how to insert an image to a PDF document.

Download Image.pdf

Published in Quick Guide
Friday, 01 April 2011 08:52

PDF HelloWorld in C#, VB.NET

The sample demonstrates how to write a "HelloWorld" to a PDF document.

Download HelloWorld.pdf

Published in Quick Guide
Tuesday, 18 January 2011 02:22

How to Convert Word to PDF

This is an all-in-one solution to convert Word to PDF. Within this solution, you can either create a word from scratch or load a word template from folder, and then edit the document as you like; finally you can effortlessly convert word to PDF in C#, VB.NET. The conversion can be doc to PDF or docx to PDF.

Spire.Doc for .NET is a professional .NET library which enables users to directly manage word editing without Microsoft Word being installed, after the editing, you can convert the document to PDF in 2 steps.

Below is the an effective screenshot of the document which will be converted to PDF, at the end Of this post, you can find the target PDF.

Word to PDF

Now feel free to download Spire.Doc for .NET and convert word to PDF for personal use or evaluation. The whole process of converting word to PDF in C#, VB.NET can be described as 2 simple steps.

1. Declare a document and load document which you prepare by using ocument.LoadFromFile() method. The parameter passed to this method is file name string.

2. Save Word document as PDF by using document.SaveToFile() method. Parameters passed to this method is file name string and file format. The file format must be PDF.

[C#]
using System;
using Spire.Doc;
using Spire.Doc.Documents;

namespace DoctoPDF
{
    class toPDF
    {
        static void Main(string[] args)
        {
            //Load Document
            Document document = new Document();
            document.LoadFromFile(@"E:\work\documents\TestSample.docx");

            //Convert Word to PDF
            document.SaveToFile("toPDF.PDF", FileFormat.PDF);

            //Launch Document
            System.Diagnostics.Process.Start("toPDF.PDF");
        }
    }
}
[VB.NET]
Imports System
Imports Spire.Doc
Imports Spire.Doc.Documents

Namespace DoctoPDF
    Friend Class toPDF
        Shared Sub Main(ByVal args() As String)
            'Load Document
            Dim document As New Document()
            document.LoadFromFile("E:\work\documents\TestSample.docx")

            'Convert Word to PDF
            document.SaveToFile("toPDF.PDF", FileFormat.PDF)

            'Launch Document
            System.Diagnostics.Process.Start("toPDF.PDF")
        End Sub
    End Class
End Namespace

After running the demo, you may find a PDF document launched on your computer:

Word to PDF

Spire.Doc is an MS Word component which enables user to perform a wide range of Word document processing tasks directly, such as generate, read, write and modify Word document for .NET and Silverlight.

More about This .NET Word component

Published in Conversion
Sunday, 01 August 2010 17:22

Data Export PDF in C#, VB.NET

This sample demonstrates how to export data table into pdf file.

Published in Demo
Page 5 of 5