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

Export PDF to server ONLY

13 Answers 114 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 06 Feb 2012, 03:03 AM
Hello, 

I am using this method to save a local PDF from a radeditor when a form is submitted:  http://blogs.telerik.com/blogs/posts/08-12-08/how-to-export-grid-to-pdf-file-and-show-the-result-using-the-window.aspx 

But this sends the PDF to the client as well. 

How can I save a PDF to the server without sending a copy to the client? 



13 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 06 Feb 2012, 01:20 PM
Hi,

You should set the OpenInNewWindow property to false, e.g.

<telerik:radeditor runat="server" ID="RadEditor1">
    <ExportSettings OpenInNewWindow="false"></ExportSettings>
</telerik:radeditor>

All the best,
Rumen
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Michael
Top achievements
Rank 1
answered on 07 Feb 2012, 04:41 AM
This makes the PDF open in the client window rather than send it to them as a download. I would rather they never see the PDF. 

What I would like is: 

  • User submits a form (Form HTML is inserted into radeditor)   (this is working)
  • PDF is saved to the server (this is working) 
  • Client is redirected to a thank you page (this is not working, the client is redirected to the PDF file instead, or offered a download of the pdf) 

How can I save a PDF to the server without showing it to the client? 
0
Rumen
Telerik team
answered on 08 Feb 2012, 04:44 PM
Hi,

You can find here an example which demonstrates how to export the editor's content in a PDF file on the server using the OnExportContentevent and without loading the PDF file in the browser. The demo is based on the following blog post: How To: Export grid to PDF file and show the result using the window.


All the best,
Rumen
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Vytautas
Top achievements
Rank 1
answered on 05 Sep 2014, 02:35 PM
Hello. Is there a way to export RadEditor content to PDF, save it to server, without displaying it to client AND without any redirection?
Provided solution does not work if remove Response.Redirect(). I tried redirecting to the same page, but then RadEditor content gets blank. This might be because RadEditor is in updatePanel.

PS. Exporting and saving works like a charm. The only problem - avoiding PDF preview and redirection, unless RadEditor content would stay as it was before exporting.
0
Ianko
Telerik team
answered on 09 Sep 2014, 03:21 PM
Hello Vytautas,

Currently there is no such functionality available. 

The only way to cancel the sent response to the client is by redirecting the page. Also, this should not be in a partial postback, i.e., in an update panel. 

As for Q3 2014, there will be a cancellation functionality that will allow the page to not be redirected in teh ExportContent event. You can examine again the RadEditor documentation when Q3 2014 is live.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Paco
Top achievements
Rank 1
answered on 23 Dec 2015, 06:04 PM

Hi, 

 it´s almost 2016, is the cancellation possible now?

Could you tell me how to achieve what Vytautas is asking for?

 

Thank you!!

0
Ianko
Telerik team
answered on 24 Dec 2015, 07:20 AM
Hi,

As of Q3 2014 there is canceling mechanism. You can find an example for this here—http://docs.telerik.com/devtools/aspnet-ajax/controls/editor/server-side-programming/events/onexportcontent.

Regards,
Ianko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Paco
Top achievements
Rank 1
answered on 28 Dec 2015, 03:25 PM

Hi!!

 

Thank you so much, that solved all my problems!!

 

0
Ashish
Top achievements
Rank 1
answered on 20 Dec 2016, 07:52 AM

Hello sir,

i have problem save pdf server side but in local easy save pdf plz help me save pdf server side 

 {

 
                    done(function (dataURI) {
                        kendo.saveAs({
                            dataURI: dataURI,     
                            fileName: "test.pdf",

                           proxyURL: "/path/to/proxy",

                           forceProxy: true
                        });
                    });
 
This function is used server side save pdf but it is can't working plz help me save the pdf server side plz send me with example

0
Ashish
Top achievements
Rank 1
answered on 20 Dec 2016, 07:54 AM
same problem
0
Ianko
Telerik team
answered on 20 Dec 2016, 09:04 AM

Hello Ashish,

The code pasted is related to Kendo Export framework. I suggest you to open a new forum thread on the topic in the corresponding product section (http://www.telerik.com/forums/kendo-ui/drawing-api).

Regards,
Ianko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Ashish
Top achievements
Rank 1
answered on 20 Dec 2016, 09:17 AM

sir,

i have not this problem not get solution plz help me

0
Ianko
Telerik team
answered on 20 Dec 2016, 09:25 AM

Hello Ashish,

The Kendo Drawing API and the Export framework provided is not a product by the UI for ASP.NET suite and. This is why it is suggested to post your question in the relevant Kendo forums. 

However, as I am aware forcing the proxy of the saveAs method involves implementing the server-side logic for exporting the base64 output to a file. That depends in the server you are using, the framework and many more environment specifics.

I can see that the code pasted is from this article: http://docs.telerik.com/kendo-ui/framework/save-files/introduction#force-proxy-usage. The next section in the same resource shows a sample code for a server-side export logic: http://docs.telerik.com/kendo-ui/framework/save-files/introduction#examples. You can use it for further guidance. 

Regards,
Ianko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Michael
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Michael
Top achievements
Rank 1
Vytautas
Top achievements
Rank 1
Ianko
Telerik team
Paco
Top achievements
Rank 1
Ashish
Top achievements
Rank 1
Share this question
or