Plans | Login    

Briefing Search
Keyword:
Category:

       

    
Author Details
zarfishan zahid
seo@aspose.com
aspose.com

Convert Pdf To Ms Word Doc Or Docx In .net


Aspose has shared a technical tip written in .Net language using which user can convert PDF document to DOC or DOCX format.

BriefingWire.com, 6/16/2013 - This technical tip shows how to convert PDF file to DOC or DOCX format in .Net using Aspose.PDF. Aspose.Pdf for .NET is flexible and supports a wide variety of conversions. Converting pages from PDF documents to images, for example, is a very popular feature. A conversion that many of our customers have requested is PDF to DOC: converting a PDF file to a Microsoft Word document. Customers want this because PDF files cannot easily be edited, whereas Word documents can. Some companies want their users to be able to manipulate text, tables and images in files that started as PDFs. Keeping alive the tradition of making things simple and understandable, Aspose.Pdf for .NET provides few lines code to transform source PDF file into a DOC file. The DocSaveOptions class provides numerous properties that improve the process of converting PDF files to DOC format. Among these properties, Mode enables you to specify the recognition mode for PDF content. You can specify any value from the RecognitionMode enumeration for this property.

Converting PDF to DOC

[C#]

// Path of input PDF document

StringfilePath = @"d:\\Source.pdf";

// Instantiate the Document object

Aspose.Pdf.Document document = newAspose.Pdf.Document(filePath);

// CreateDocSaveOptions object

DocSaveOptionssaveOptions = newDocSaveOptions();

// Set the recognition mode as Flow

saveOptions.Mode = DocSaveOptions.RecognitionMode.Flow;

// Set the Horizontal proximity as 2.5

saveOptions.RelativeHorizontalProximity = 2.5f;

// Enable the value to recognize bullets during conversion process

saveOptions.RecognizeBullets = true;

// Save the resultant DOC file

document.Save(@"d:\\Resultant.doc", saveOptions);

[VB.NET]

' Path of input PDF document

Dim filePath As String = "d:\\Source.pdf"

' Instantiate the Document object

Dim document As Aspose.Pdf.Document = New Aspose.Pdf.Document(filePath)

' CreateDocSaveOptions object

Dim saveOptions As DocSaveOptions = New DocSaveOptions()

' Set the recognition mode as Flow

saveOptions.Mode = DocSaveOptions.RecognitionMode.Flow

' Set the Horizontal proximity as 2.5

saveOptions.RelativeHorizontalProximity = 2.5F

' Enable the value to recognize bullets during conversion process

saveOptions.RecognizeBullets = True

' save the resultnat DOC file

document.Save("d:\\Resultant.doc", saveOptions)

Converting PDF to Docx format

[C#]

//open pdf document

Document pdfDocument = newDocument("source.pdf");

// instantiate DocSaveOptions object

DocSaveOptionssaveOptions = newDocSaveOptions();

// specify the output format as DOCX

saveOptions.Format = DocSaveOptions.DocFormat.DocX;

//save document in docx format

pdfDocument.Save("output.docx", saveOptions);

[VB.NET]

//open pdf document

Document pdfDocument = newDocument("source.pdf");

// instantiate DocSaveOptions object

DocSaveOptionssaveOptions = newDocSaveOptions();

// specify the output format as DOCX

saveOptions.Format = DocSaveOptions.DocFormat.DocX;

//save document in docx format

pdfDocument.Save("output.docx", saveOptions);

More about Aspose.Pdf for .NET

-Homepage of Aspose.Pdf for .NET: http://www.aspose.com/.net/pdf-component.aspx

- Read More about Working with Document Conversion: http://www.aspose.com/docs/display/pdfnet/Working+with+Document+Conversion

- Download Aspose.Pdf for .NET at: http://www.aspose.com/community/files/51/.net-components/aspose.pdf-for-.net/default.aspx

 
 
FAQs | Contact Us | Terms & Conditions | Privacy Policy
© 2026 Proserve Technology, Inc.