HELP!!! CuteEditor.Convertor.PDF.HTML2PDF Memory Render Issue [System.OutOfMemoryException]

  •  08-27-2007, 3:31 AM

    HELP!!! CuteEditor.Convertor.PDF.HTML2PDF Memory Render Issue [System.OutOfMemoryException]

    Hi There
     
    When I try to render the below html into pdf it render method throws a System.OutOfMemoryException exception. If I us simple html that is limited to only a couple chars it renders the pdf without any hickups. It doesn't matter which server or machine I test it on, there still seems to be an issue. Is there a known memory leak in the dll? Your help in this regard wil be much appreciated!
     
    .Net 2, C#
     
     
    string t = String.Format("<html>"
    +"<body bottommargin='0' leftmargin='0' rightmargin='0' topmargin='0'>"
    +" <div style='text-align: center'>"
    +" <span style='font-size: 32pt; font-family: Arial'><span style='color: #0033cc'>"
    +" <br />"
    +" <hr color='#0033cc' />"
    +" <span style='font-size: 10pt; color: #000000'>&nbsp;</span>sa</span>waste<br />"
    +" <strong><span style='font-size: 11pt'><span><span style='color: #0033cc'>&nbsp; &nbsp;
    CS</span>ONLINE<br />"
    +" </span>Waste Supplier Application Form</span></strong><br />"
    +" <span style='font-size: 10pt'>"
    +" <hr color='#0033cc' />"
    +" <span style='text-decoration: underline'></span>"
    +" <table style='width: 598px' bgcolor='whitesmoke'>"
    +" <tr>"
    +" <td align='center' valign='top' style='height: 18px'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='center' valign='top'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='center' valign='top'>"
    +" <table align='center'>"
    +" <tr>"
    +" <td align='right' bgcolor='lightgrey' colspan='3' style='text-align: left'valign='middle' width='200'>"
    +" <strong>Existing Supplier</strong></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' valign='middle' width='200'>WCS Account Number</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='text-align: right' valign='middle' width='200'>Supplier Name</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right'valign='middle' width='200'>SAP
    ccount Number</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle' width='200'>Address</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle' width='200'></td>"
    +" <td align='center' style='width: 3px; height: 18px'></td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle' width='200'></td>"
    +" <td align='center' style='width: 3px; height: 18px'></td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle'
    idth='200'>Code</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle' width='200'>Contact
    erson</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle'
    idth='200'>Telephone Number</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle' width='200'>Fax
    umber</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='text-align: right' valign='middle' width='200'>Payment Terms</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='text-align: left' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='top' width='200'>Rate</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' width='260' valign='top'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle'
    width='200'>Comments</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle' width='200'></td>"
    +" <td align='center' style='width: 3px; height: 18px'></td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle' width='200'>Requested By</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle' width='200'>Completed By</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro'valign='middle' width='200'>To Be Authorised By</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" <tr>"
    +" <td align='right' bgcolor='gainsboro' style='height: 18px; text-align: right' valign='middle' width='200'>Processed By</td>"
    +" <td align='center' style='width: 3px' valign='top'>:</td>"
    +" <td align='left' style='height: 18px' width='260'></td>"
    +" </tr>"
    +" </table>"
    +" </td>"
    +" </tr>"
    +" </table>"
    +" </span></span> "
    +
    " </div>"
    +"</body>"
    +"</html>");
    CuteEditor.Convertor.PDF.
    HTML2PDF html2pdf = new CuteEditor.Convertor.PDF.HTML2PDF(t);
    html2pdf.Render();
    html2pdf.Save(
    @"C:\TEMP\uploads\111.pdf");
View Complete Thread