RadEditor Export Issues

4 posts, 0 answers
  1. Rick
    Rick avatar
    33 posts
    Member since:
    Aug 2012

    Posted 10 Aug 2012 Link to this post

    • I am using MS Visual Studio 2010 in a 3.5 environment.
    • I am using Microsoft Vista (32 bit)
    • The database is currently located on an SQL 2008 server.
    • I am using RadGrid & tools, version 2012.2.724.35
    • I am using Internet Explorer (9.0.8112.16421)
    • I am programming in VB.net

    I am using a radEditor that I have populated with HTML.  I am sending this to a PDF file into a new window, but when I try to open or save it, I get an error.

    PROBLEM
    Open - I immediately get a message saying the file can't be downloaded.  I can hit retry and Adobe Reader opens and displays a message: Adobe Reader could not open FILENAME because it is either not a supported file type or because the file has been damaged.

    I can do a Save As and it's fine.

    I can also choose to not open in a New Window and view it in the current window.  It looks fine and I can print and download.  However, I don't want to leave the page I was on and printing defaults to portrait although I specified landscape.

    This is my settings for the radEditor
    <telerik:RadButton ID="btnReport" runat="server" style="top: 0px; left: 0px"
        Text="Summary Report">
    </telerik:RadButton>
    <telerik:RadEditor ID="radPDFReport" Runat="server" Height="114px"
        Width="685px" ExportSettings-FileName="ForeignCurrencyTotals"
        Visible="False">
        <ExportSettings OpenInNewWindow="True">
            <Pdf PageHeight="8.5in" PageWidth="11in" AllowAdd="True" AllowCopy="True"
                AllowModify="True" Title="Foreign Curency Totals" Author="Accounting"
                Creator="Accounting" PageBottomMargin="45px" PageFooterMargin="18px"
                PageHeaderMargin="18px" PageLeftMargin="18px" PageRightMargin="18px"
                PageTopMargin="37px" />
        </ExportSettings>
        <Content>CONTENT</Content>
     
        <TrackChangesSettings CanAcceptTrackChanges="False"></TrackChangesSettings>
    </telerik:RadEditor>

    This is the HTML I'm pasting.
    <table style="width: 100%; height: 100%;" cellspacing="0" cellpadding="2">
        <colgroup><col /><col /><col /><col /><col /><col /></colgroup>
        <tbody>
            <tr>
                <td colspan="3" style="border-left-style: solid; border-left-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;"><strong>Foreign Currency Totals </strong></td>
                <td colspan="3" style="text-align: right; vertical-align: top; border-right-style: solid; border-right-width: 1px; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;">As of 8/10/2012</td>
            </tr>
            <tr>
                <td rowspan="2" style="text-align: left; vertical-align: top; border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 2px;"><strong>Country Code</strong></td>
                <td rowspan="2" style="text-align: left; vertical-align: top; border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 2px;"><strong>Currency name</strong></td>
                <td colspan="3" style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;"><strong>Details</strong></td>
                <td rowspan="2" style="text-align: left; vertical-align: top; border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-bottom-style: solid; border-bottom-width: 2px;"><strong>Comments</strong></td>
            </tr>
            <tr>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 2px;">Foreign Total</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 2px;">Exchange Rate</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 2px;">USD Total</td>
                </tr>
            <tr>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;">CAD</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;">Canada Dollar</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px; text-align: right;">1,140</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px; text-align: right;">1.00219480662</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px; text-align: right;">$1,142.50</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;"> </td>
            </tr>
            <tr>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;">CNY</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;">China Yuan</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px; text-align: right;">8,470</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px; text-align: right;">0.15720057221</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px; text-align: right;">$1,331.49</td>
                <td style="border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;"> </td>
            </tr>
            <tr>
                <td style="border-top-style: solid; border-top-width: 1px; border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;"><strong>Total</strong></td>
                <td style="border-top-style: solid; border-top-width: 1px; border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;"> </td>
                <td style="border-top-style: solid; border-top-width: 1px; border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;"> </td>
                <td style="border-top-style: solid; border-top-width: 1px; border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;"> </td>
                <td style="border-top-style: solid; border-top-width: 1px; border-left-style: solid; border-left-width: 1px; border-bottom-style: solid; border-bottom-width: 1px; text-align: right;">$3,998.96</td>
                <td style="border-top-style: solid; border-top-width: 1px; border-left-style: solid; border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-bottom-style: solid; border-bottom-width: 1px;"> </td>
            </tr>
        </tbody>
    </table>


    The code to initiate the Export:
    radPDFReport.Content = sHTMLBody
     
    radPDFReport.ExportSettings.FileName = "ForeignCurrencyTotals_" & DateAndTime.Month(Now()) & "-" & DateAndTime.Day(Now()) & "-" & DateAndTime.Year(Now())
    radPDFReport.ExportToPdf()

  2. Rick
    Rick avatar
    33 posts
    Member since:
    Aug 2012

    Posted 10 Aug 2012 Link to this post

    Disregard.  The Open issue was because I was testing locally and not on the server where it works fine.

  3. Moon
    Moon avatar
    250 posts
    Member since:
    Apr 2008

    Posted 02 Jan 2013 Link to this post

    Does this mean we can't run/test this locally at all?
  4. Rumen
    Admin
    Rumen avatar
    14010 posts

    Posted 03 Jan 2013 Link to this post

    Hello,

    The Export to PDF functionality of RadEditor works locally too.

    Regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top