C#: Online Guide
How To: Word SDK
Convert PDF to Word
Convert PDF to Word
  |  
Home ›› XDoc.Word ›› C# Word: Convert PDF to Word

How to C#: Convert PDF, Excel, PPT to Word


Online C# Tutorial for Converting PDF, MS-Excel, MS-PPT to Word




PDF, MS-Excel, MS-PPT to Word Conversion Overview



By integrating XDoc.Word SDK into your C#.NET project, PDF, MS-Excel and MS-PPT can be converted to Word document. Generally speaking, following conversion types are supported.


From PDF to Word


From MS-XLS and MS-XLSX to Word


From MS-PPT and MS-PPTX to Word


Related .net document control helps:
asp.net edit pdf page control: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
asp.net redact pdf control: ASP.NET Redact PDF Document Control: redact, remove PDF text, images in web browser using C# ASP.NET
asp.net annotate pdf control: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
asp.net image file viewer: ASP.NET Image Document Viewer Control: view, annotate, redact, convert image files in html web browser
asp.net mvc file viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects
asp.net pdf file permission control: ASP.NET PDF File Permission Control: apply, remove PDF file permission settings in C#
asp.net powerpoint file viewer: ASP.NET PowerPoint Document Viewer Control: view pptx files online in C# using ASP.NET




How to C#: Convert PDF to Word



Add references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.XDoc.Office.Inner.Office03.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.XDoc.Word.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.PDF.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.PDF;


Following is C# demo code for PDF (.pdf) to Word conversion.




String inputFilePath = Program.RootPath + "\\" + "1.pdf";
String outputFilePath = Program.RootPath + "\\" + "Output.docx";

// Load a PDF document.
PDFDocument doc = new PDFDocument(inputFilePath);

// Convert it to Word document.
doc.ConvertToDocument(DocumentType.DOCX, outputFilePath);





How to C#: Convert Excel to Word



This is a C# class example for Excel (.xlsx) to Word conversion.




String inputFilePath = Program.RootPath + "\\" + "1.xlsx";
String outputFilePath = Program.RootPath + "\\" + "Output.docx";

// Load an Excel (.xlsx) file.
XLSXDocument doc = new XLSXDocument(inputFilePath);

// Convert Excel to Word.
doc.ConvertToDocument(DocumentType.DOCX, outputFilePath);





How to C#: Convert PPT to Word



Following sample code may help you with converting PowerPoint to Word file.




// Used to register all DLL assemblies.
WorkRegistry.Reset();

String inputFilePath = Program.RootPath + "\\" + "1.pptx";
String outputFilePath = Program.RootPath + "\\" + "Output.docx";

// Load a PowerPoint (.pptx) file.
PPTXDocument doc = new PPTXDocument(inputFilePath);

// Convert it to a Word.
doc.ConvertToDocument(DocumentType.DOCX, outputFilePath);