To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
When the client closes his browser a CloseEvent will be fired. I’m catching this and close the application also on server-side:
Now I generate an PDF and want so send it to the client:
StreamResource sr = new StreamResource(streamSource, "MyDoc.pdf",
By doing this the browser on client-side will be fired a CloseEvent and the Client can’t receive the pdf-file.How can I send the pdf to the client without closing the application?
The following solution will be blocked by the browser:
Any other suggestions?Dominik
How about providing a DownloadStream using URIHandler? It doesn't behave exactly the same, but I think it could work. Anyway, why are you closing application in the window close?