PFD Generation - having problems

Last post 11-05-2008, 8:25 AM by m3jim. 3 replies.
Sort Posts: Previous Next
  •  10-31-2008, 8:29 AM 45241

    PFD Generation - having problems

    I'm trying to use CuteEditor to create a pdf.  I'm using the code below (which does create a pdf), but, my pdf's always come out in TimesRoman font, even if I put a span tag around the text (<span style='font-family: Arial;font-size: 19px;'>).   The size changes, but the font remains TimeRoman. 
     
    Also, if my form has column spans in it (<td colspan=2>.....), the resulting pdf is wrong, the colspans don't work.   Is there some trick to getting PDF's to work correctly?   Sould I be able to send any valid html to the pdf converter and have the resulting pdf look correct?
     
     
    Dim t As string
    t="<html><body><table width=660>.......... </table></body></html>"
    Dim
    html2pdf As New CuteEditor.Convertor.PDF.HTML2PDF(t)
    html2pdf.RenderSinglePageContent =
    False
    html2pdf.PageHeight = CInt(CuteEditor.Convertor.PDF.PDFUtils.PageHeight)
    html2pdf.Render()
    html2pdf.Save(
    "c:\test.pdf"

     

    2) I'm trying to find out if my code is bad or if it's an issue with CueEditor, so I'm trying to duplicate what I'm seeing on the following page: http://cutesoft.net/example/createpdf.aspx
    If I modify the text in CuteEditor, click submit (I then see the HTML), and then click the 'Check PDF Link', the resulting PDF doesn't change.  Should it??   Or is your web page set up to show a static pdf instead of a dynamic one?
     
    Thanks, Jim
    Using CuteEdit 6.2, and I have a server license for it.....
     
     
     
     
     
     
  •  10-31-2008, 9:27 AM 45249 in reply to 45241

    Re: PFD Generation - having problems

  •  10-31-2008, 9:50 AM 45253 in reply to 45249

    Re: PFD Generation - having problems

    Tried that page.....    Results are even worse than my code above.   The fonts don't change size or font-family, tables aren't displayed....
     

    <html>
        <head>
            <title>Sample document for test</title>
        </head>
    <body>
    <div>Hello world</div>
    <div>&nbsp;</div>
    <div style="font-size: 18pt; font-family: Arial">Bigger&nbsp;<span style="font-family: Times New Roman">TimesRoman</span></div>
    <div style="font-size: 18pt; font-family: Arial">
    <table style="border-right: 2px; border-top: 2px; border-left: 2px; border-bottom: 2px" cellspacing="2" cellpadding="2" width="500" border="0">
        <tbody>
            <tr>
                <td>1</td>
                <td>2</td>
                <td>3</td>
            </tr>
            <tr>
                <td>4fasfsafsafasfsadfdsaf</td>
                <td colspan="2">5</td>
            </tr>
            <tr>
                <td>7</td>
                <td>8fsafdsafsa</td>
                <td>9fsdafdsafdsafdsafdsa</td>
            </tr>
        </tbody>
    </table>
    </div>
    </body>
    </html>

     

  •  11-05-2008, 8:25 AM 45414 in reply to 45253

    Re: PFD Generation - having problems

    Any update?   
     
    Jim
View as RSS news feed in XML