We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to convert txt to pdf?

Hi
Plz help me how to do convertion from text to pdf.

Thanks in advance.

Regards
Hema.

Hi Hema,

Thanks for considering Aspose.

Well, you may utilize FileFormatType.TabDelimited, FileFormatType.CSV or Workbook.Open(string fileName, char separtor) overloaded method to open your .txt file and save it to .xml file (Aspose.Pdf integrated) and then use the Aspose.Pdf APIs to convert the file into .pdf file format.

E.g.,

Workbook wb = new Workbook();
wb.Open("d:\\test\\mytextfile.txt",FileFormatType.TabDelimited);
wb.Save("d:\\test\\bookpdf.xml",FileFormatType.AsposePdf);

Pdf pdf = new Pdf();
pdf.BindXML("d:\\test\\bookpdf.xml",null);
pdf.Save("d:\\test\\mypdffile.pdf");
Thank you.

Thank You sir…