Create .pdf from string

Hey! in some application need to show your text in PDF, so for this i done some R&D and finally got it
here is a very basic code


using Root.Reports;
using System;

namespace NisarAhmad
{

public class WriteToPdf
{

public static void Main(string str)
{
Report report = new Report(new PdfFormatter());//Create new PDF
FontDef fd = new FontDef(report, "Helvetica");//Set font style
FontProp fp = new FontPropMM(fd, 6);//set size
Page page = new Page(report);
page.Add(0, 20, new RepString(fp, str));//set font position and pass your string
//page.AddCenteredMM(80, new RepString(fp, textbox));
RT.ViewPDF(report, "Test.pdf");//Name of PDF file
}

}
}


how to call this in you aspx page
on button click
NisarAhmad.WriteToPdf.Main(TextBox1.Text);


Everyone demand dll with code, because without dll, code is useless, for this i attached dll file with this code,so you people can execute this code without trouble


Attachments

  • Reports.dll (27996-251430-Reports.rar)
  • Reports.dll (27996-251433-Reports.rar)
  • Comments

    Author: Vinod11 Apr 2014 Member Level: Gold   Points : 0

    hi,
    i am not able to find your attached dll file



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: