Open Lzm010409 opened 1 year ago
Hello, did you take a look at the examples on the demo on how the resource is set? See example and files location.
If you wish to use the setSrc method only setting an url for the file please take in consideration that the file should be on the same server as where the component is run, so that's why your test is not working. Something like this pdfViewer.setSrc("/frontend/pdf/example.pdf");
where the frontend folder path is src\main\resources\META-INF\resources\frontend should work.
Hi, I've a little issue implementing your Vaadin Component. I would like to display a pdf on my page. Unfortunately the log always shows me the error "invalid Pdf structure". At first I thought it might be due to the presence of form fields. Then I tried to display a simple document using your PDF viewer, but without success. I have also tried both input methods: StreamRessource and Absolute path of the file. Unfortunately without success. I would really like to use your extension, especially because we work a lot with pdfs, but unfortunately I don't really get anywhere. I have attached the code snipped and also some screenshots, maybe you can find the time to give me a short feedback.
`PdfViewer pdfViewer = new PdfViewer();
Thank you in advance...