hello,
I’ve a problem version 23 of Vadin. I get “Invalid PDF Structure” in the browser and not show the content of file. The download works.
My code:
PdfViewer pdfViewer = new PdfViewer();
StreamResource resource = new StreamResource(manualUsuario.getName(), () -> createResource(manualUsuario));
pdfViewer.setSrc(resource);
add(pdfViewer);
private InputStream createResource(File path) {
try {
return FileUtils.openInputStream(path);
} catch (Exception ex){
}
return null;
}
Thanks for help.