locked
how to convert dynamic html page to pdf at runtime RRS feed

  • Question

  • User-669984938 posted

    hi ,

          i have to convert html page(report which is dynamic in nature i.e. different for different user )  to pdf at runtime how can i do that .

    Plz  help urgent....

    Hemant Shrivastava

     

    Monday, July 17, 2006 7:13 AM

All replies

  • User-604260821 posted

    please refer the book programmer to programmer

    Professional Crystal Reports for Visual Studio .NET 2nd Edition

      David McAmiis (wrox) u will get every thing in it

     

    Monday, July 17, 2006 12:10 PM
  • User-669984938 posted

    hi ,

         thanx for replaying but frnd my problem is different, i am already having aspx page(i.e. html page
    ) which is report is populating in which there r <td>,datagrid, repetor ,lables on which the data is populating dynamically say if u r viewing project histrory report of a perticular project u hav to select that project and then click view report so the data in that page is populated from database frm that i have to generate pdf not from crytal reports.

    Thanks & Regards

    Hemant Shrivastava.

     

    Tuesday, July 18, 2006 1:52 AM
  • User1147341638 posted

    alt-soft.com has a product Xml2PDF. I am implementing it myself right now. Also will convert XSL-FO and SVG to PDF.

    Ibex is also another product. Not sure if it will take XHTML

     

    Also annetae software in japan has a product and a style sheet for xhtml to xsl-fo then you can use Apache FOP to get your PDF.

     

    Travis Johnson

    MCSD.Net

    Thursday, July 20, 2006 9:17 PM
  • User-669984938 posted

    hi travis ,

             wel i hav finded one way to get that trouble i got one freeware and i have moved up with that but stucked in another problem i dont k/w wether that supports the asp.net 2.0 or not , i m sending you link if u hav a bit time then plz chk that out, and my question in also on that regarding that particular product.

    http://www.codeproject.com/aspnet/HTML2PDF.asp

     

    my question regarding that is ->

    i got that code on codeproject.com on htmldoc,i tried to implement that on my project in asp.net 2.0
    its not generating pdf wht i hav done is ->
    System.Diagnostics.Process pProcess = new System.Diagnostics.Process();
                    pProcess.StartInfo.FileName = @"D:\HtmlToPDF\HtmlToPDF\ghtmldoc.exe";
                    pProcess.StartInfo.Arguments = @"--webpage --quiet --bodyfont Arial " + @" -t pdf14 -f D:\HtmlToPDF\HtmlToPDF\test1.pdf D:\HtmlToPDF\HtmlToPDF\test.html";
                    pProcess.StartInfo.WorkingDirectory = @"D:\HtmlToPDF\HtmlToPDF\";
                    pProcess.Start();
    ***************************************************************************
    the pProcess.start(),donst start while passing the arguments in both ways that r on ur article and one in the comments .if i comment that pProcess.StartInfo.Arguments  part then its opening the converter ,
    and when i m passing the argument its just going through it without giving any exception the code is executed but not generating the pdf,
    as i m using asp.net 2.0 so i dont hav iis on my system and i havnt configured that,
    and i have given the all permission to the folder to everone user in which i have keept that ghtml and in which i m writing the pdf .
    am i making some mistake in that code .

     can u help me in that.

    Hemant Shrivastava

    Friday, July 21, 2006 3:43 AM
  • User1147341638 posted

    Well I avoided products that were command line and only evaluated native .net products. I do not have any experience calling command line windows applications from .net.

    Sorry I can't help

     

    Travis

    Friday, July 21, 2006 4:21 PM
  • User-848302442 posted

    Use this converter HTML to PDF. With help of this tools I've created many reports runtime in my asp.net app. It allows generate a pdf file as a file or a memory stream. So, it's able to show the pdf without saving it on the server.

    At their website you can find helpful vb.net html to pdf samples:

            Dim html_st = "<b>Testing string</b><br /><em>with italic text.</em>"
            Dim file_pdf = "c:\new_report.pdf"
    
            Try
                Dim conv As New DuoDimension.HtmlToPdf()
                conv.OpenHTML(html_st)
                conv.SavePDF(file_pdf)
                System.Diagnostics.Process.Start(file_pdf)
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
    

     

     

    Monday, June 20, 2011 8:39 AM