Editor ExporttoPDF does not work in Chrome

2 posts, 0 answers
  1. Craig
    Craig avatar
    5 posts
    Member since:
    Dec 2011

    Posted 17 Apr 2012 Link to this post

    I have an exportToPdf function call which I copied from your demo. It's supposed to store the pdf to a byte stream and save it to a file. The code snippets are below:

    <telerik:RadEditor ID="c_reMessage" runat="server" ContentFilters= "DefaultFilters,PdfExportFilter" Height="345" Width="760">
        <ExportSettings OpenInNewWindow="true"></ExportSettings>
                     <telerik:EditorTool Name="Print"/>
                     <telerik:EditorTool Name="AjaxSpellCheck"/>
                     <telerik:EditorTool Name="FindAndReplace"/>
                     <telerik:EditorTool Name="SelectAll"/>
                     <telerik:EditorTool Name="Cut"/>
                     <telerik:EditorTool Name="Copy"/>
                     <telerik:EditorTool Name="Paste"/>
                     <telerik:EditorTool Name="PasteStrip"/>
                     <telerik:EditorSeparator />
                     <telerik:EditorTool Name="Undo"/>
                     <telerik:EditorTool Name="Redo"/>                                                                                     
                     <telerik:EditorTool Name="ImageManager"/>
                     <telerik:EditorSeparator />
                     <telerik:EditorTool Name="LinkManager"/>
                     <telerik:EditorTool Name="Unlink"/>
                     <telerik:EditorTool Name="ForeColor"/>
                     <telerik:EditorTool Name="BackColor"/>
                     <telerik:EditorTool Name="ApplyClass"/>
                     <telerik:EditorTool Name="FormatStripper"/>                                       
                     <telerik:EditorTool Name="InsertTable"/>
                     <telerik:EditorTool Name="InsertFormElement"/>
                     <telerik:EditorTool Name="ToggleScreenMode"/>                                             
                     <telerik:EditorTool Name="FormatBlock"/>
                     <telerik:EditorTool Name="FontName"/>
                     <telerik:EditorTool Name="RealFontSize"/>                                       
                     <telerik:EditorTool Name="AbsolutePosition"/>
                     <telerik:EditorSeparator />
                     <telerik:EditorTool Name="Bold"/>
                     <telerik:EditorTool Name="Italic"/>
                     <telerik:EditorTool Name="Underline"/>
                     <telerik:EditorTool Name="StrikeThrough"/>
                     <telerik:EditorSeparator />
                     <telerik:EditorTool Name="JustifyLeft"/>
                     <telerik:EditorTool Name="JustifyCenter"/>
                     <telerik:EditorTool Name="JustifyRight"/>
                     <telerik:EditorTool Name="JustifyFull"/>
                     <telerik:EditorTool Name="JustifyNone"/>
                     <telerik:EditorSeparator />
                     <telerik:EditorTool Name="Indent"/>
                     <telerik:EditorTool Name="Outdent"/>
                     <telerik:EditorSeparator />
                     <telerik:EditorTool Name="InsertOrderedList"/>
                     <telerik:EditorTool Name="InsertUnorderedList"/>
                     <telerik:EditorSeparator />
                     <telerik:EditorTool Name="ToggleTableBorder"/>
                     <telerik:EditorTool Name="XhtmlValidator"/>

       Private Sub c_ibtnAuditPlanComplete_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles c_ibtnAuditPlanComplete.Click
       Private Sub c_reMessage_ExportContent(ByVal sender As Object, ByVal e As Telerik.Web.UI.EditorExportingArgs) Handles c_reMessage.ExportContent
            ' this will run when the pdf export method is called
            Dim fileData As Byte()
            fileData = System.Text.Encoding.Default.GetBytes(e.ExportOutput)

    All of this works fine in IE and FireFox, but in Chrome it never gets to the c_reMessage_ExportContent sub. I have tried it with both OpenNewWindow set to true and false. With true, it attempts to open Adobe and fails. With false, it just hangs. Note that I don't actually want the pdf to open in a window, and there is a redirect further down in the ExportContent sub that prevents that, but it never gets there.

    Can you tell me what I need to do to get this to work in Chrome?
    FYI, sometimes if I call c_reMessage.ExportToPdf() repeatedly in Chrome, it will work, but not always.
  2. Rumen
    Rumen avatar
    14351 posts

    Posted 20 Apr 2012 Link to this post


    I was unable to reproduce the reported problem. You can see my test in the following video http://screencast.com/t/NSVEmbMmtJkh as well as test the attached project. Please, provide reliable steps to reproduce and a video so that I can replicate the issue on my end.

    All the best,
    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