Skip to content

Comments

Add custom PDF annotation provider#1235

Draft
mvasilak wants to merge 6 commits intozotero:masterfrom
mvasilak:add-custom-pdf-annotation-provider
Draft

Add custom PDF annotation provider#1235
mvasilak wants to merge 6 commits intozotero:masterfrom
mvasilak:add-custom-pdf-annotation-provider

Conversation

@mvasilak
Copy link
Contributor

@mvasilak mvasilak commented Feb 10, 2026

Adds custom PDF document annotation provider, as the first part of PDF reader performance improvements.

  • Adds custom PDF document annotation provider that combines unsupported document annotations from file, with supported document annotations that are cached in the database. Database cache is primed each time the PDF file changes.
  • Fixes filtering for document annotations if they have a non-default color (parity with desktop).
  • Fixes appearance change of document annotations if they have a non-default color.
  • Makes side bar view controller lazy loading.
  • Fixes annotation preview rendering when previous appearance is dark.
  • Improves document annotation preview deletion logic.

In a next part, the database annotations will also be loaded through the custom annotation provider, and they will be loaded per page request, not having to go through all annotations when the document loads, or for every related operation. E.g. filtering will also happen in the provider context, so that only pages used will be modified, if needed. Annotations view controller will also be made more performative and potentially decoupled from PDF reader action handler.

@mvasilak mvasilak force-pushed the add-custom-pdf-annotation-provider branch from 9bf7537 to fa45c42 Compare February 18, 2026 12:34
Add custom data for PDF annotation base color
Improve PDF annotations reader key retrieval
Use extra PDF document annotation colors in filtering
Improve PDF annotations filtering
Ignore PDF annotation links when filtering
Convert PDF reader document annotations to lazy results
Compute annotations pages index set in PDF reader action handler
Use page sections in PDF annotations view controller
Allow read annotations database request for specific page
Cache document annotations based on file md5
Make reader side bar load lazy
Override class for locked document annotations
Improve annotation preview deletion logic
Improve code
Fix typo
@mvasilak mvasilak force-pushed the add-custom-pdf-annotation-provider branch from fa45c42 to 9ad8eb5 Compare February 20, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant