-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re: No Visual display #9
Comments
Hello, I did some testing with the code you shared and for me the pdf is displaying okay. pdfviewer-issue9-test.zip getElement().getStyle().set("height", "100%");
getElement().getStyle().set("overflow", "hidden");
getElement().getStyle().set("display", "flex");
getElement().getStyle().set("flex-direction", "column"); or just add If the problems persists, can you modify the attachment to reproduce your issue? Regards. |
Hello, I have added a simplified project in this link. Managed to get a screen capture to this. |
Good Morning, I had the same problem with Vaadin 22.0.4. My initialize code for the pdf viewer is:
completePdfFile -> Has the correct path to the pdf file in the file system. It is a absolute path. Edit: Add some screenshots. I had the problem if the pdf file outside the jar and under src/main/resources |
Hello @weiliang2. I was able to isaolate the issue after a lot of testing in the project you shared. The problem is that
(See another example where pdf.js doesn't work correctly because of another library mozilla/pdf.js#11412) |
Hello @rwarnecke "Invalid PDF structure" is a different error. That error is shown when the library can't interpret the content of a PDF file. This should be handled in a separate issue. Is it possible for you to create a new issue and share a project reproducing the problem? Thanks. |
Hello @paodb, really appreciate the time you spend to investigate on this. I have verified its working by removing the problem dependency. Its is working now. This component is super handy and is so important in every application. Everything we do involves a pdf. I strongly recommend this component should be a basic component. Just 1 more thing. It would be really nice if the other buttons are also implemented. Thanks once again. |
Hello @zlesak, are you still having problems? if so, which Vaadin version & which version of the component are you using? You don't need to import the pdf.js library, just add the dependency for the add-on in your pom.xml. Keep in mind that the layout containing the pdfViewer might need to have full height in order to display correctly. If the error persists please create a sample project so we can take a better look and maybe it would be better to create a separate issue. |
Hello, sorry i have a new issue. Screenshot 2 unable to find resource. Screenshot 3: URL was wrong. is there any advise you can give me?
Findings: based on my testing there are no issue with routing. But with a OptionalParameter. the url seems broken. @OverRide |
Hello @weiliang2 can you share what vaadin version and what version of the pdf viewer component are you using? |
Hello i am using vaadin 14.10.4. JDK version 8. |
Do you mind sharing how you do it? |
take a look here: https://vaadin.com/docs/latest/flow/integrations/spring/configuration |
Hi,
can you help me? this is a great component but i cant seem to see anything after setting the pdf.
attached is the pdf.
the main app layout has already set to full size content.
@route(value = PAGE_ROOT, layout = MainAppLayout.class)
public class DashboardView extends Div implements HasDynamicTitle, BeforeEnterObserver, BeforeLeaveObserver {
The text was updated successfully, but these errors were encountered: