I have a problem -in my dot net web application, I export my crystal report to pdf. In some computers it works great and some computers get
the error : File does not begin with '%pdf-' -
what can I do in my code to make sure it works on all comuters ?
my code is the following:
to my function displaypdf I send my crystal report:
private void DisplayPDF(ReportDocument rep)
Stream stm = rep.ExportToStream(ExportFormatType.PortableDocFormat);
byte buff = new byte[stm.Length];
stm.Position = 0;
stm.Read(buff, 0, buff.Length);
Response.ContentType = "Application/pdf";
Response.OutputStream.Write(buff, 0, buff.Length);
Again I want to stress that on some computers it works great and on some not what can I do in my code that will make it work everywhere.