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
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
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?
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
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.
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.
Hi,
it´s almost 2016, is the cancellation possible now?
Could you tell me how to achieve what Vytautas is asking for?
Thank you!!
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
Hi!!
Thank you so much, that solved all my problems!!
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
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
sir,
i have not this problem not get solution plz help me
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