Today I use this code to open a PDF file
StreamResource resourcesReport = new StreamResource(movimentacaoService.imprimirMovimentacao(novaMovimentacao.getIdMovimentacao()), "Recibo" + System.currentTimeMillis() + ".pdf");
BrowserWindowOpener opener = new BrowserWindowOpener(resourcesReport);
Button downloadButton = new Button("Imprimir Comprovante",FontAwesome.DOWNLOAD);
opener.extend(downloadButton);
So when my user click in my downloadButton I open a window with my pdf file.
So its possible to when I open that windows call the famous window.print();? And it
s possible to put one callback in that tab? when my user close that tab I need to run some code.
tks