Add PDF support in attachment preview dialog#11656
Add PDF support in attachment preview dialog#11656w15eacre wants to merge 5 commits intokeepassxreboot:developfrom
Conversation
|
@droidmonkey Could you explain how to add these dependencies for the build? |
|
Will need to add it to the vcpkg.json and CMakeLists.txt, probably as an optional dependency On the CI boxes we will install it |
|
Great! |
|
@droidmonkey I couldn’t find qt5-image-formats-plugin-pdf in the package manager. Can I use Poppler instead? |
|
Poppler seems well regarded and supported, i don't have an issue with it. |
|
@droidmonkey I need your help. The CI/CD environment doesn’t have the required library (Poppler). Do I need to add a new CMake option to enable or disable this feature? |
|
Don't worry about the CI env, I'll get it all set once your work is ready for review. |
|
I have finished it. I think previewing the first page is enough, but there’s no problem with adding all pages to the preview. |
|
@droidmonkey Do you need some more information to update CI? |
|
No i just haven't had time |
|
@w15eacre, @droidmonkey |
|
That's actually a good point |
We can only edit text attachments. How do you see this implemented if there are many files we cannot edit? Should we just enable or disable the edit button in such cases? |
|
I will implement this in the next PR because I think it will be a big change |
Introduce a function for "editable Mime-Type" detection. If it's editable you set the preview as not read-only and when you close the preview you ask if you want to save the changes |
|
@w15eacre I am getting very poor results with all PDF renders (this is on Windows): I am going to reserve this for 2.8.0 since it also introduces a dependency. |
6c26118 to
c34d1d6
Compare
|
@droidmonkey |




Add PDF support in attachment preview dialog
To preview the first page of a PDF file you need poppler >= 23.1.0.
Add an optimization to resize images.
Screenshots
Before the optimization

After

Testing strategy
Type of change