This is a migrated thread and some comments may be shown as answers.

Editor ExporttoPDF does not work in Chrome

1 Answer 78 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 17 Apr 2012, 10:29 PM
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:

Aspx
<telerik:RadEditor ID="c_reMessage" runat="server" ContentFilters= "DefaultFilters,PdfExportFilter" Height="345" Width="760">
    <ExportSettings OpenInNewWindow="true"></ExportSettings>
     <Tools>
           <telerik:EditorToolGroup>
                 <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:EditorToolGroup>  
             <telerik:EditorToolGroup>
                 <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:EditorToolGroup>                                       
            <telerik:EditorToolGroup>
                 <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"/>
            </telerik:EditorToolGroup>
                                        
     </Tools>                            
</telerik:RadEditor>

vb.net
   Private Sub c_ibtnAuditPlanComplete_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles c_ibtnAuditPlanComplete.Click
           c_reMessage.ExportToPdf()
  
...
 
 
   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.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Apr 2012, 02:03 PM
Hi,

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,
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.
Tags
Editor
Asked by
Craig
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or