Skip to content
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

Add PDF support in attachment preview dialog #11656

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

w15eacre
Copy link
Contributor

@w15eacre w15eacre commented Jan 13, 2025

Add PDF support in attachment preview dialog

To preview the first page of a PDF file you need poppler >= 23.1.0.

Screenshots

plugin

Testing strategy

  • Added tests for a new type of attachments. Unit tests were implemented to verify the functionality of the new attachment type.
  • Manually. Performed manual testing to ensure the correct behavior of the new attachment feature in various scenarios.

Type of change

  • ✅ New feature (change that adds functionality)

@w15eacre
Copy link
Contributor Author

@droidmonkey Could you explain how to add these dependencies for the build?

@droidmonkey
Copy link
Member

droidmonkey commented Jan 13, 2025

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

@w15eacre
Copy link
Contributor Author

Great!
I figured out how to add a dependency and will do that this week. And I'll try adding UI tests because the dialog has become more complex.

@w15eacre
Copy link
Contributor Author

@droidmonkey I couldn’t find qt5-image-formats-plugin-pdf in the package manager. Can I use Poppler instead?

@droidmonkey
Copy link
Member

Poppler seems well regarded and supported, i don't have an issue with it.

@w15eacre
Copy link
Contributor Author

@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?

@w15eacre w15eacre marked this pull request as ready for review January 18, 2025 23:58
@droidmonkey
Copy link
Member

Don't worry about the CI env, I'll get it all set once your work is ready for review.

@w15eacre
Copy link
Contributor Author

I have finished it. I think previewing the first page is enough, but there’s no problem with adding all pages to the preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants