-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Open Discussion: Remove PDFjs #45
Comments
Maybe you can just split the library in Or maybe you can split the library in For me personally: Any place I need to show PDFs I need a solution for Capacitor as well at the same time. |
I just have a new project that will only be used in browsers, so I won't need the PDFjs dependency for that. So I'd say: fork this repo and do one of these:
|
@mesqueeb Good point - I like the idea of |
I am still on the wall for this and haven't done anything because of lack of suggestions/ideas/etc :( |
Hi @hawkeye64, I'm gonna report what happened when we tried to use this extension in one of our apps. So basically we were developing an app (quasar & capacitor) for the hunters in Switzerland and we needed to show a pdf that was several pages long (>100) and it needed to work offline and refresh its contents when there was connectivity. We ended up opening the file as an external file because this and other pdf viewers we tried were not working well on mobile because of pdfjs and it's sluggishness or because of the bad UI/UX they had. I thinks that most use cases on capacitor, or mobile in general, are these:
The top bar that is currently displayed is not very attracting on mobile 'cause it's stealing some screen real estate, which on mobile isn't many. On mobile most of the time you just need a "pdf scroller". I'd also suggest to fork the extension and have something like this:
I've got also some ideas on a possible UI for the qpdfviewer-mobile, let me know if you're interested in seeing a sketch! |
@cabassi Yes, please! I have recently been inspired by @jesusvilla in some recent work he has done. Hoping he will help out a bit here. Yes, I do like the multiple app-extensions. I feel pdfjs is a burden, if you just need to access the HTML 5 Pdf Viewer. |
I agree with you @jesusvilla, the mobile ext needs to take into account for mobile UX! I mean, you can maybe on a tablet, but for smartphone I think less than 1% of the apps that shows a pdf need to edit it. I made a very basic XD Some additional considerations:
This behavior is very similar to how Apple Safari works when showing PDFs. @jesusvilla a note: what are you saying about PDFtron and PSDPFkit is valuable and these are good ideas for the desktop version of this extension, but for mobile, I think it's not worth it. What do you think ? |
@cabassi I like where you are going with the design. I am curious what would be in the hamburger menu... |
The hamburger menu is just for navigation. I extracted this from a mockup of the JagdGR app What I wanted to show was just the super minimalist overlay which is shown when you scroll the pdf. Do you think that's something you may be interested to develop ? What are your thoughts on mobile pdf fruition ? |
I think there should be a property with 3 modes: desktop, mobile, auto. By default it will be in I'm still developing it, so ask for a little patience please as i'm taking into account UI and performance. I hope it is to the liking of the whole community. ❤️ |
@jesusvilla That's a fantastic news! I'm sure the community as a whole is going to appreciate your hard work. As for mobile, what plans do you have about navigation between pages and in the page itself? |
Thank you @cabassi, by mobile do you mean this? |
Yes! Sorry I didn't imply that was a thing since a saw the two arrows for navigation. In fact I wonder what are these for if you can scroll with your thumb ;) Btw it seems pretty neat already! |
the navigation buttons have the other viewers, so I put them, it's never too much. 😉 |
Personally, for mobile I think they're not needed. I found giving a user too much ways to do a thing to be counterproductive. Of course it's not the case for a thing that simple like a scroll / tap a button, but it's a principle I like to follow from the most basic UI interaction. Maybe you can have a prop to hide / show the arrow buttons, so if someone feels it's not needed they can just hide them. I'm looking forward to see this ext :) |
I agree with you, overloading with options is bad, but this is not the case, sometimes it is easier to scroll directly on each page (navigation button) or other users may believe that it's more comfortable with using the scroll. Also, the idea is that each button can be shown or hidden. |
You thought every detail. Thanks for your work! Feel free to ask for feedback or help with testing. I'm glad to help if needed. |
@cabassi thanks for your ideas, you are already contributing a lot 👍 |
I would like to add my own experience. I use QPdfviewer in a Quasar Android Cordova project and the only way I could get it to work is by using the pdfjs type. Actually unlike what the documentation states, the pdfjs type works fine with blobs. I have a core .net back end which sends a base64 string and the plugin displays PDFs fine with a blob. |
@gmalignon The html5 uses the internal PDF viewer built into browsers. Electron and mobiles do not have this capability. That's why PDFjs was origainally added. However, PDFjs has more flexibility that can be programatically accessed.It's likely we will now keep PDFjs and ditch the html5 version. |
The latest was just released with Quasar v2/Vue v3 support. |
I am considering to remove the PDFjs dependency and go back to just the HTML5 PDF Viewer (as it was originally). The latter is more light-weight, because it uses the internal PDF Viewer built into the browser. However, this excludes Electron/Capacitor/Cordova, etc. In which case, these platforms should use the PDFjs on their own, or an extension could be written to incorporate it.
Ever since the PDFjs dependency was added, this project has stalled out because of the issues with PDFjs.
Please voice your concerns and/or advice here.
The text was updated successfully, but these errors were encountered: