-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: LovedJohnySmith
Message 2 in Discussion

Srini:                 Please have a look at the following code snippets:       
public string Run(string sRawUrl)
    {            
        string sFileName = GetNewName();
        string sPage = Server.MapPath("" + sFileName + ".html");            
        string sUrlVirtual = sRawUrl;
        StringWriter sw = new StringWriter();         
Server.Execute(sUrlVirtual, sw);         StreamWriter sWriter = 
File.CreateText(sPage);
        sWriter.WriteLine(sw.ToString());
        sWriter.Close();             System.Diagnostics.Process pProcess 
                             = new System.Diagnostics.Process();
        pProcess.StartInfo.FileName = m_sDrive + ":" + m_Directory + 
                                            "\\ghtmldoc.exe";
        pProcess.StartInfo.Arguments = "--webpage --quiet " + sFontSize + 
                  m_sWaterMark + " --bodyfont Arial " + sLandScape + 
                  " -t pdf14 -f " + sFileName + ".pdf " + sFileName + ".html";
        pProcess.StartInfo.WorkingDirectory = m_sDrive + ":" + m_Directory;     
    pProcess.Start();                     return(sFileName + ".pdf");           
 
    }   This code snippets uses an HTML to PDF exe from ESP. HTMLDOC is a 
desktop application to create PDF documents from a HTML page. I wrote some code 
to use it from a web application. Similiarly there are plenty of Thirdparty 
tools like., ABCPdf, PDFLib. Perhaps this free PDF code will be of use to you: 
http://www.ujihara.jp/iTextdotNET/en/index.html Or maybe you'd rather use this 
fine another product: 
http://www.aspose.com/Products/Aspose.Pdf/ could be used for this requirement. 
or else if you want to build your own PDF converter assembly, then i kindly 
refer the following URL. which will more helpful for you to write library for 
HTML to PDF converter.
http://sourceforge.net/projects/report Or  If You might be interested in this 
link (HOW TO: Generate PDF Output 
On-the-fly with ASP.NET): 
http://www.aspnetworld.com/articles/2004011801.aspx    Thanx, Smith

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to