HTML2PDF

Last post 07-22-2008, 10:15 AM by Dtest. 2 replies.
Sort Posts: Previous Next
  •  07-22-2008, 8:43 AM 42437

    HTML2PDF

    Hi, I try this;
     
    CuteEditor.Convertor.PDF.HTML2PDF html2pdf = new CuteEditor.Convertor.PDF.HTML2PDF(new Uri("http://www.google.com"));
    html2pdf.Render();
    html2pdf.Save(Response.OutputStream);
     
    And it throws this error;
     
    [NullReferenceException: Object reference not set to an instance of an object.]
       CuteEditor.Convertor.PDF.HTML2PDF.Render() +28
     
    Am I doing something wrong? Some other sites do work but the pdf doesn't really look like the site...
     
     
  •  07-22-2008, 8:50 AM 42438 in reply to 42437

    Re: HTML2PDF

    I think there is another problem, this is what I get when I try the code with the url www.cutesoft.net;
     
    [OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
       CuteEditor.Convertor.PDF.PDFRect.AddText(String text, FontStyle fontStyle, Boolean warp, PDFAnchor anchor) +950
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +5589
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2) +6751
       CuteEditor.Convertor.PDF.HTML2PDF.Render() +376
     
    And aspnet_wp.exe goes up to 1,5gb memory usage..
  •  07-22-2008, 10:15 AM 42440 in reply to 42438

    Re: HTML2PDF

    And 1 more problem I notice..
     
    When generating a pdf from html with a table in it with border="1" the pdf is empty... removing the border="1" or setting it to 0 works..
     
    + it won't render the Euro sign
View as RSS news feed in XML