imags text file(like *.pdf,*.Tiff,.*gif,*.jpeg,*.jpg files) convert into word text file using .NET

Posted by Rmohankumar under VB.NET on 11/17/2011 | Points: 10 | Views : 3292 | Status : [Member] | Replies : 3
how to Convert any imags text file(like *.pdf,*.Tiff,.*gif,*.jpeg,*.jpg files) into word text file using VB.NET or C#.Net, help me with source code


Posted by: Rebecca Yang on: 9/27/2013 [Member] Starter | Points: 25

Viewing the following code which is used to convert image into word by using Spire.DOC :

using System.Drawing;
using Spire.Doc;
using Spire.Doc.Documents;
using Spire.Doc.Fields;

namespace WordImage
class ImageinWord
static void Main(string[] args)
//Create Document
Document document = new Document();
Section s = document.AddSection();
Paragraph p = s.AddParagraph();

//Insert Image and Set Its Size
DocPicture Pic = p.AppendPicture(Image.FromFile(@"E:\Work\Documents\SampleImage\Sample.jpg"));
Pic.Width = 750;
Pic.Height = 468;

//Save and Launch
document.SaveToFile("Image.docx", FileFormat.Docx);

{visual Basic}

Imports Spire.Xls
Imports Spire.Pdf
Imports Spire.Xls.Converter

Namespace ExceltoPDF
Class Program
Private Shared Sub Main(args As String())
' load Excel file
Dim workbook As New Workbook()

' Set PDF template
Dim pdfDocument As New PdfDocument()
pdfDocument.PageSettings.Orientation = PdfPageOrientation.Landscape
pdfDocument.PageSettings.Width = 970
pdfDocument.PageSettings.Height = 850

'Convert Excel to PDF using the template above
Dim pdfConverter As New PdfConverter(workbook)
Dim settings As New PdfConverterSettings()
settings.TemplateDocument = pdfDocument
pdfDocument = pdfConverter.Convert(settings)

' Save and preview PDF
End Sub
End Class
End Namespace

Rmohankumar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Thomas128 on: 3/19/2014 [Member] Starter | Points: 25

As far as I know, there is not such converter to directly turn an image into a Word doc. However, you can use the OCR technology to extract the content from your pictures and then export to a Word doc. Here's is a simple guide that might help :)

Today is a gift. That's why it's called the Present!

Rmohankumar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Evanpan on: 3/4/2016 [Member] Starter | Points: 25

I wonder do you have any suggetion about pdf extraction process? Any suggestion will be appreciated. Thanks in advance. ( )

Best regards,

Rmohankumar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response