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
Gajendra JangidPosted Jun 20, 2019, 11:44 PM
Maen BadwanPosted Jun 20, 2019, 6:20 AM
If yes, you can check the conversion cloud services from LEADTOOLS that support this type of conversions.
You can call the service directly from your.NET project as described here:
https://services.leadtools.com/documentation/tutorials/net-cs-conversion-tutorial
https://www.leadtools.com/sdk/document/document-converter
Rajesh ThiruPosted Jun 18, 2019, 12:11 AM
Sapna GirishPosted Jun 17, 2019, 8:24 PM
Shweta LodhaPosted Jun 17, 2019, 8:38 AM