Hi,
C# on Visual Stidio 2022, Wisej 2.2.46
I have the following code:
MemoryStream ms = new MemoryStream();
using (FileStream file = new FileStream(file_name, FileMode.Open, FileAccess.Read)) file.CopyTo(ms);
ms.Seek(0, SeekOrigin.Begin);
Application.DownloadAndOpen(“_blank”, ms, “Meaningfull name.pdf”);
It works perfect on Edge, Opera, Firefox
On Chrome I get:
On iPhone 16 and MacBook it just won’t open.
Please advice
Hi Julie,
Yes, the behaviour is reproducible in 3.5.17.8. Just run it directly from Visual Studio, On Edge and on Chrome.
New project, on Page1 add a button, and on button click write:
private void button1_Click(object sender, EventArgs e)
{
string file_name = “C:\\Temp\\test.pdf”;
MemoryStream ms = new MemoryStream();
using (FileStream file = new FileStream(file_name, FileMode.Open, FileAccess.Read)) file.CopyTo(ms);
ms.Seek(0, SeekOrigin.Begin);
Application.DownloadAndOpen(“_blank”, ms,”test.pdf”);
}
You must have c:\temp\test.pdf file.
I attached the full project and test.pdf 🙂
Can you try with Wisej 3.5.17 (most recent version) and see if that resolves the issue?
If that does not fix it, please include a reproducible test case.
Julie
Please login first to submit.