Using SaveDocumentToByteArray()
Posted: Fri Jun 28, 2013 2:42 pm
Hello,
I'm trying to use this method SaveDocumentToByteArray(), to get a byte[] and return to a client, so that this client can then create a pdf file using this byte[] object. For some weird reason, the pdf file created doesn't open because of an error when creating the file.
Do i have to do anything else?
Server:
documentPDF = stiReport.SaveDocumentToByteArray();
return documentPDF;
Client:
byte[] document = target.GetPDFDocumentPreview(doc, true, "Report.mrt");
//Save byte[] in a pdf file
system.IO.File.WriteAllBytes(@"C:\Temp\filetosave.pdf", document);
Thank you for your help.
Best Regards
Bruno Fernandes
I'm trying to use this method SaveDocumentToByteArray(), to get a byte[] and return to a client, so that this client can then create a pdf file using this byte[] object. For some weird reason, the pdf file created doesn't open because of an error when creating the file.
Do i have to do anything else?
Server:
documentPDF = stiReport.SaveDocumentToByteArray();
return documentPDF;
Client:
byte[] document = target.GetPDFDocumentPreview(doc, true, "Report.mrt");
//Save byte[] in a pdf file
system.IO.File.WriteAllBytes(@"C:\Temp\filetosave.pdf", document);
Thank you for your help.
Best Regards
Bruno Fernandes