Export PDF to server ONLY

14 posts, 0 answers
  1. Michael
    Michael avatar
    23 posts
    Member since:
    Jan 2012

    Posted 05 Feb 2012 Link to this post

    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? 



  2. Rumen
    Admin
    Rumen avatar
    13083 posts

    Posted 06 Feb 2012 Link to this post

    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 >>
  3. Michael
    Michael avatar
    23 posts
    Member since:
    Jan 2012

    Posted 06 Feb 2012 Link to this post

    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? 
  4. Rumen
    Admin
    Rumen avatar
    13083 posts

    Posted 08 Feb 2012 Link to this post

    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 >>
  5. Vytautas
    Vytautas avatar
    3 posts
    Member since:
    Feb 2014

    Posted 05 Sep 2014 in reply to Rumen Link to this post

    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.
  6. Ianko
    Admin
    Ianko avatar
    1707 posts

    Posted 09 Sep 2014 Link to this post

    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.

     
  7. Paco
    Paco avatar
    2 posts
    Member since:
    Nov 2015

    Posted 23 Dec 2015 in reply to Ianko Link to this post

    Hi, 

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

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

     

    Thank you!!

  8. Ianko
    Admin
    Ianko avatar
    1707 posts

    Posted 24 Dec 2015 Link to this post

    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
  9. Paco
    Paco avatar
    2 posts
    Member since:
    Nov 2015

    Posted 28 Dec 2015 in reply to Ianko Link to this post

    Hi!!

     

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

     

  10. Ashish
    Ashish avatar
    5 posts
    Member since:
    Dec 2016

    Posted 20 Dec 2016 Link to this post

    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

  11. Ashish
    Ashish avatar
    5 posts
    Member since:
    Dec 2016

    Posted 20 Dec 2016 in reply to Michael Link to this post

    same problem
  12. Ianko
    Admin
    Ianko avatar
    1707 posts

    Posted 20 Dec 2016 Link to this post

    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.
  13. Ashish
    Ashish avatar
    5 posts
    Member since:
    Dec 2016

    Posted 20 Dec 2016 in reply to Ianko Link to this post

    sir,

    i have not this problem not get solution plz help me

  14. Ianko
    Admin
    Ianko avatar
    1707 posts

    Posted 20 Dec 2016 Link to this post

    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.
Back to Top