Skip to content

Conversation

@bmjcode
Copy link
Collaborator

@bmjcode bmjcode commented Jul 27, 2025

This was suggested as a workaround for qpageview performance issues, but I believe it is justified anyway since I'm not aware of any practical need for higher zoom levels in Frescobaldi. I would prefer to make this change here rather than in qpageview in case other applications using the latter have more exotic needs.

Fixes #2035.

This was suggested as a workaround for qpageview performance issues, but
I believe it is justified anyway since I'm not aware of any practical
need for higher zoom levels in Frescobaldi. I would prefer to make this
change here rather than in qpageview in case other applications using
the latter have more exotic needs.

Fixes frescobaldi#2035.
@fedelibre
Copy link
Member

You wrote (see below) that this issue is limited to the QtPdf backend and it would not be present if a python-poppler-qt6 module existed. Perhaps you may add a note in the commit log? Just in case someone one day decides to port python-poppler-qt to Qt6.

Of course what should actually happen is that the score is only rendered in say cached chunks around the current view.

This actually is how qpageview works internally. The issue is that QtPdf -- the backend library we use now -- does not currently support rendering less than a whole page at a time, so tiling is effectively bypassed when rendering PDF files.

Our previous renderer used Poppler, which does support partial rendering. I believe that's what Okular uses as well. It is without question a superior library. It's also notoriously difficult to package with Python applications, and none of us could get the bindings to work under PyQt6. So we went with what was available and working when we did the port.

@bmjcode
Copy link
Collaborator Author

bmjcode commented Jul 27, 2025

I'll add a note if you'd like one, but the reason I implemented this is it seemed like a reasonable idea regardless of there being an issue. I don't see how python-poppler-qt6 existing would make gigantic zoom factors any more useful. Other applications also limit zoom factors for presumably similar reasons; for example, LibreOffice Writer's maximum is 600%.

@fedelibre
Copy link
Member

Ok, then no need to add a note. The discussion here is enough.

@bmjcode bmjcode merged commit 544b623 into frescobaldi:master Jul 27, 2025
@bmjcode bmjcode deleted the pagedview-max-zoom branch July 27, 2025 14:50
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.

Zooming in on PDF viewer crashes program

2 participants