Export web page to a PDF

4 posts, 0 answers
  1. Ash
    Ash avatar
    4 posts
    Member since:
    Dec 2015

    Posted 14 Jul Link to this post

    Hello Everyone,

    We want to export any web page into a PDF. It should take any web URL as an input and convert the contents of it into a PDF file. 

    We referred to the following blogs. 
    http://www.telerik.com/blogs/using-an-external-library-for-the-export-to-pdf-functionality-in-telerik-s-asp.net-editor
    Mentioned solution works but doesn't do the complete job. It has 2 issues. 
    1. It doesn't export images and 
    2. It doesn't retain the layout of the web page.

    We have also checked the following link which demonstrates how to use Telerik ASP.NET ClientExportManager to export the current web page contents to a PDF. But as mentioned above our requirement is little different, we want to provide web URL as an input to the component which should get converted to PDF. 

    http://demos.telerik.com/aspnet-ajax/client-export-manager/overview/defaultcs.aspx

    Can Telerik support team help us to provide a complete solution for this?

    There are other 3rd party components which we have already tried and they do this conversion well, 
    but we want to know if this can be achieved using Telerik component and how.

    Appreciate your help in this.

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 19 Jul Link to this post

    Hello Ash,

    The ClientExportManager can export specific HTML elements or the whole current page, but its export functions do not accept a url. The content that is exported must be visible at the moment of export.
    There is a scenario, in which it can be used to export the Editor's content and this approach is demonstrated in the following section of the documentation. Note that the element of the Editor's content area can be configured and can be set to either "iframe" or "div". This is something to be considered when using the ClientExportManager as it is not able to export the content of iframe elements.
    In order to keep the threads consistency, if you have other questions about the Editor and its functionality, I would suggest opening a thread in its forum section.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ash
    Ash avatar
    4 posts
    Member since:
    Dec 2015

    Posted 21 Jul in reply to Ivan Danchev Link to this post

    Hi Ivan,

    Thanks for the response. 
    I tried the suggested solution, but observed that it only works for text content. It does not work for images. It also doesn't retain the look & feel of the original page.

    We are looking for a solution which will convert any given web page into a PDF file maintaining all styling and images.

    Would like to know if it is supported in the current version of the Telerik or not.

  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 25 Jul Link to this post

    Hello Ash,

    The ClientExportManager is the control that exports both text and images preserving the styling and images, event though it has its own limitations that have to be taken into consideration when exporting. However, as previously mentioned the ClientExportManager exports only the current page and cannot export pages by specifying their url. Such functionality is currently not supported.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top