I have a pdf file save as a byte array in a db table. Now, I want to retrieve it from the db and display it. When using the following code:
InputStream is = new ByteArrayInputStream(report.getPdfForm());
StreamResource resource = new StreamResource("blah", () -> is);
viewer = new PdfBrowserViewer(resource);
pdfViewer.add(viewer);
The filesystem Save As dialog opens? Am I doing something wrong here?
Thanks