TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajesh Thiru
NA
101
4.7k
convert word Document to pdf using c#
Jun 17 2019 8:25 AM
Here i have tried so many codings for convert word Document to Pdf but not working properly (alginment issue)here i mentioned the code below,
//Read the Data from Input File
StreamReader rdr = new StreamReader(txtInput.Text);
//Create a New instance on Document Class
Document doc = new Document();
//Create a New instance of PDFWriter Class for Output File
PdfWriter.GetInstance(doc, new FileStream(txtOutput.Text, FileMode.Create));
//Open the Document
doc.Open();
//Add the content of Text File to PDF File
doc.Add(new Paragraph(rdr.ReadToEnd()));
//Close the Document
doc.Close();
MessageBox.Show("Conversion Successful....");
//Open the Converted PDF File
System.Diagnostics.Process.Start(txtOutput.Text);
Kindly suggest some other code without using API and if possible Kindly correct the mistake in my code for alignment issue
Reply
Answers (
5
)
Remove Duplicate string in vb.net
Failed to load resource: the server responded with a status