PdfViewer pdfViewer = new PdfViewer(); StreamResour

PdfViewer pdfViewer = new PdfViewer();
StreamResource resource = new StreamResource("example.pdf", () -> getClass().getResourceAsStream("/pdf/example.pdf"));
pdfViewer.setSrc(resource);
add(pdfViewer);


My pdf keeps on changing, but this pieces of code is caching the previous one can you please guide me

Hello, what you mean you're pdf keeps changing? The StreamResource is always going to get what you have in the pdf folder with the file name you're specifying. If you can clarify the problem you can create an issue here so we can take a look.

Regards.