I would like to add a header (logo) to the top of the HTML element that I am exporting. I only want to export a portion of my page, but would like to add a header to the top of it. Is this possible with the Client Export Manager?
If this is not possible, is it possible to export more than one element on the page into the same document?
0
Accepted
Ivan Danchev
Telerik team
answered on 19 Jun 2015, 11:07 AM
Hello,
Exporting different elements of the page and appending them to a document is not supported out-of-the-box by RadClientExportManager. This can be achieved by hiding elements of your page prior to exporting the desired content. Consider the following example:
If we do not want to export div "doNotExport" and its content we can hide it before calling the export method and then show it after the export is done as shown below:
function exportElement() {
var exp = $find("RadClientExportManager1");
$telerik.$("#doNotExport").hide();
exp.exportPDF($telerik.$("html"));
setTimeout(function () {
$telerik.$("#doNotExport").show();
}, 1000);
}
In this example we are exporting the whole page but this approach applies to cases involving export of specific DOM elements as well. In these cases you will have to export an element (a div for instance) which wraps the content you want exported and the content that you want to exclude and you have to hide the latter before the export as shown in the code snippet above.
Regards,
Ivan Danchev
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