Export PDF to server ONLY

9 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
    12848 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. UI for ASP.NET Ajax is Ready for VS 2017
  4. 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? 
  5. Rumen
    Admin
    Rumen avatar
    12848 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 >>
  6. 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.
  7. Ianko
    Admin
    Ianko avatar
    1535 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.

     
  8. 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!!

  9. Ianko
    Admin
    Ianko avatar
    1535 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
  10. 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!!

     

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017