-
Notifications
You must be signed in to change notification settings - Fork 435
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
[Bug] Import PDF -> First page duplicated #1156
Comments
Thanks for reporting, but I cannot reproduce that. I followed your steps:
So the first page of the newly created document stays as it was and the two pages of the PDF are added as Page 2 and Page 3. There is nothing after that. Is there something else I have to do to reproduce this? My environment:
|
Interesting, maybe it comes from my setup. Finally I do not use the dev branch but my branch with the filter document feature : https://github.com/sebojolais/OpenBoard/tree/filteringDocuments Below are the steps to reproduce with screenshots:
Qt 5.15, X11, KDE |
Still cannot reproduce. If you want to debug: The relevant code is OpenBoard/src/board/UBBoardController.cpp Lines 1449 to 1501 in 3b38085
In line 1484 the number of added pages is calculated. To actually analyze the import you have to further follow into Edit: can you check which Second Edit: I just modified the code so that it has to use the Third edit: I just fixed that other problem occurring when you dropped a PDF URL to the board. See #1157. |
Hi,
|
This is quite interesting. The OpenBoard/src/adaptors/UBImportImage.cpp Lines 59 to 69 in a5dd78f
So it seems that for your environment the |
I think I can explain this. By default, Qt does not support too many image formats. See supportedImageFormats() for a quite short list. But this list can be extended by plugins. There is a collection of plugins adding more formats, Some of them come with Qt. On my system the packages are called But also KDE adds more plugins for the image reader. On Ubuntu (and probably Neon) they are called As part of the WebEngine Qt also offers a PDF renderer. This renderer also comes with an image format plugin for PDF. Maybe it is contained in some package called So finally it very much depends on the environment, and various components can add image formats. In your environment it seems that there are much more installed format plugins for Qt5 than for Qt6. This explains the different length of the list. So back to your question: Yes, there is a chance that this happens for everybody. At least on Linux, I cannot speak for Windows and MacOS, but generally the plugin architecture for image formats is the same there. And on Linux it might depend on some other software the user has installed, independent of OpenBoard. On the other operating systems we bundle Qt with the application and have therefore better control over the installed plugins. |
Thank you for your detailed answer and for the PR #1158. |
Describe the bug
When I import a PDF on the board, the first page is duplicated and paste at the end.
To Reproduce
This behavior happens for every kind of PDF and OB documents.
To not reproduce
Expected behavior
We expect to add the number of pages of the PDF, no more.
Actual behavior
The Drag and Drop on the board addes the first page at the end
Context
systematic
Linux
Ubuntu 22.04Windows
macOS
dev
Additional context
OS detailed version is MANDATORY (if not provided, the issue will be closed as incomplete).
KDE Neon 6.2 (Ubuntu 22.04 based)
The text was updated successfully, but these errors were encountered: