c# - Export Rad Grid to PDF with html header -
i using telerik rad grid. want export grid html header.
i want manually add together header html. reading html file , assigning raw html below.
this id final html getting generated after reading file.
<div style='width:500px;float:left;'> <div style='width:250px;float:left;'> <div> client : sachin </div> <div> machine : new machine </div> <div> build : r956 </div> </div> <div style='width:250px;float:left;'> <div> date : 11/7/2014 5:15:05 </div> </div>
and here how assigning it. caption variable contains html shown above.
protected void radpreview_pdfexporting(object sender, gridpdfexportingargs e) { e.rawhtml = caption + e.rawhtml; }
system.invalidcastexception: unable cast object of type 'telerik.web.apoc.layout.blockarea' type
'telerik.web.apoc.layout.areacontainer'. @ telerik.web.apoc.fo.flow.blockcontainer.layout(area area) @ telerik.web.apoc.fo.flow.block.layout(area area) @ telerik.web.apoc.fo.flow.flow.layout(area area, part region) @ telerik.web.apoc.fo.flow.flow.layout(area area) @ telerik.web.apoc.fo.pagination.pagesequence.format(areatree areatree) @ telerik.web.apoc.streamrenderer.render(pagesequence pagesequence) @ telerik.web.apoc.fo.fotreebuilder.endelement() @ telerik.web.apoc.fo.fotreebuilder.parse(xmlreader reader)
i tried search lot on issue. please suggest me solution works.
after searching lot on issue found issue 1 old telerik thread.
pdf export not handle 2 scenarios.
1) div tag fixed width or height. ( issue in case )
2 ) div tags absolute position.
hope help someone.
c# asp.net telerik radgrid export-to-pdf
No comments:
Post a Comment