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

RadEditor1.ExportToPdf() doesn't create a URL for the current PDF page.

2 Answers 115 Views
Editor
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 26 Aug 2009, 01:22 PM
Greetings,

I'm using the ExportToPdf() functionality which is a nice feature.  Only draw-back I see so far is that it doesn't provide adequate navigation.  When the content of the RadEditor is loaded into the PDF page, the URL in the browser should change to reflect the PDF view.

However, the URL remains the same as the RadEditor page.  Consequently, if the user clicks the 'back' button, they go back two screens and the contents of the PDF and RadEditor are lost into never, never land. 

In theory, this application is primarily affording the user the ability to preview the RadEditor contents as opposed to using the PDF page to perform a save.  After the user previews the PDF, they should make a decision to perform a save from the RadEditor where all the custom buttons are located (i.e. Save, Edit, Delete).  If the user saves it from the RadEditor page, the html string will be saved to the database for further processing.

At this point I can only allow the user to preview in PDF because they can't navigate back to the RadEditor.  Is there something I'm missing?  Is there a way to give the PDF page a URL name?

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Aug 2009, 06:59 AM
Hi John,

Have you tried to set the OpenInNewWindow ExportSetting inner property? It configures the PDF converter to open the exported PDF in a new instead of the same page:

<telerik:RadEditor ID="RadEditor1" runat="server" SkinID="DefaultSetOfTools">
            <ExportSettings OpenInNewWindow="true" />
</telerik:RadEditor>

Another approach is to directly save the PDF file on the server using the OnExportContent event. More information is available in this forum thread: RadEditor:Save pdf from serverside.

All the best,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
John
Top achievements
Rank 1
answered on 31 Aug 2009, 03:57 PM
Thanks, that did the trick....
Tags
Editor
Asked by
John
Top achievements
Rank 1
Answers by
Rumen
Telerik team
John
Top achievements
Rank 1
Share this question
or