feras salim feras salim - 1 year ago 206
Vb.net Question

Export Devexpress XtraPivotGrid with theme to pdf using Itextsharp

I am using DevExpress ASPXPivotGrid control for my

site.I am also using DevExpress ASPXPivotGridExporter control to ASPXPivotGrid to pdf. The problem I am having is that ASPXPivotGridExporter cannot export themes and right to left languages. Exported output always come out with default formating and just left to right languages. I would like to know if its possible to export pivot grid with theme and with
rtl languages
? If not is there work around it with
this what I tried so far

Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "inline;filename=TestPage.pdf")
Dim sw As New StringWriter()
Dim hw As New HtmlTextWriter(sw)
Dim sr As New StringReader(sw.ToString())
Dim pdfDoc As New Document(PageSize.A4, 10.0F, 10.0F, 100.0F, 0.0F)
Dim htmlparser As New HTMLWorker(pdfDoc)
PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
Using memoryStream As New MemoryStream
Chart1.SaveImage(memoryStream, ChartImageFormat.Png)
Dim img As Image = Image.GetInstance(memoryStream.GetBuffer())
End Using

Answer Source

using aspxpivotgridexporter doesn't support right to left languages. but finally i was able to find a work around by exporting pivot grid to html using pivot grid exporter then I can add the needed styles to the resulting html file and adding the direction to the text wither rtl or ltr

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download