Closed kaamui closed 7 months ago
I can reproduce the problem here. Will look onto it later or over the weekend.
Thank you ! Not related, but please also note that I had to disable the cleanupDocument
feature. Every scenario where you insert new pages on a document already containing some produce the bug where document is immediately removed (in our context only) !
1.7.1 is going to be released ASAP.
Thank you ! Not related, but please also note that I had to disable the
cleanupDocument
feature. Every scenario where you insert new pages on a document already containing some produce the bug where document is immediately removed (in our context only) !
I have seen that commit. I still believe the idea is useful. So let's keep this as work to do, same as the glitches.
1.7.1 is going to be released ASAP. :-)
Some first observations using Gammaray:
The sceneTransform
of the PDF is different in the error case.
Good:
After copying:
The difference is exactly the scaling problem. So next analysis should be where the sceneTransform
is set.
Note that the transform
matrix is the same in both cases, but the scale
property is 0.75 in one case and 1 in the other case.
Here: https://github.com/letsfindaway/OpenBoard/blob/6b27e9a84509511400678fe4cc8ac8d6713cc15c/src/adaptors/UBSvgSubsetAdaptor.cpp#L856 a PDF scaling factor is set when reading a document. Probably this factor is not set when copying a page.
so UBGraphicsPDFItem::copyItemParameters
should do the same ? (cp->setScale(this->scale());
?)
so
UBGraphicsPDFItem::copyItemParameters
should do the same ? (cp->setScale(this->scale());
?)
Probably yes. I have not analyzed how a page is copied and have something else to do in the afternoon. But this was also my idea for a try.
I tried and it's working. If you don't mind, I commit the fix so I can move on building a new version for the test team.
Thank you for the help !
Hi Martin,
a teacher just reported me a new issue regarding PDF scaling. This time, not at export contrary to the cases we analysed together on #93
Are you OK to look at it ?
Describe the bug
When copying a page from one document to another, the copied page PDF background is not sized correctly. Restarting OpenBoard fixes the issue.
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen. The PDF page is correctly sized.
Actual behavior
A clear and concise description of what actually happened The PDF page is not correctly sized. Restarting OpenBoard fixes the issue.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional resources
PDF, images, sounds... anything useful to reproduce the bug BUG-PDF-DECALAGE-SOURCE.zip
Context
systematic
1.7.0
1.7.0
Linux
Windows
macOS
OpenBoard download page
Additional context
Ubuntu 20.04.6 LTS
1 (1920x1080)