hi Everybody,
I am exporting radgrid into pdf. But on the same time, I want to add an jpg image into same pdf, by converting into bytes. In debugging it is showing all total bytes into newarr, and even it adds same total kbs into resultset pdf file, but it does not show that additional image into result pdf file. Please do help me.
MemoryStream chartStream;// it contain image in chartStream on button click and after button click execute RadGrid1_GridExporting.
protected void RadGrid1_GridExporting(object source, GridExportingArgs e)
{
using (FileStream fs = File.Create(FILEPATH))
{
byte[] chartbytes = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
byte[] imagebytes = chartStream.ToArray();
byte[] newarr;
newarr = chartbytes.Concat(imagebytes).ToArray();
fs.Write(newarr, 0, newarr.Length);
}
}
I am exporting radgrid into pdf. But on the same time, I want to add an jpg image into same pdf, by converting into bytes. In debugging it is showing all total bytes into newarr, and even it adds same total kbs into resultset pdf file, but it does not show that additional image into result pdf file. Please do help me.
MemoryStream chartStream;// it contain image in chartStream on button click and after button click execute RadGrid1_GridExporting.
protected void RadGrid1_GridExporting(object source, GridExportingArgs e)
{
using (FileStream fs = File.Create(FILEPATH))
{
byte[] chartbytes = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
byte[] imagebytes = chartStream.ToArray();
byte[] newarr;
newarr = chartbytes.Concat(imagebytes).ToArray();
fs.Write(newarr, 0, newarr.Length);
}
}