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

Export web page to a PDF

3 Answers 500 Views
ClientExportManager
This is a migrated thread and some comments may be shown as answers.
Ash
Top achievements
Rank 1
Ash asked on 14 Jul 2016, 05:40 PM

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.

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 19 Jul 2016, 01:33 PM
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.
0
Ash
Top achievements
Rank 1
answered on 21 Jul 2016, 05:18 AM

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.

0
Ivan Danchev
Telerik team
answered on 25 Jul 2016, 02:28 PM
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.
Tags
ClientExportManager
Asked by
Ash
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Ash
Top achievements
Rank 1
Share this question
or