Make Okular load document synopsis asynchronously

Hi guys,

Some PDF documents don’t have document synopsis embedded into the file. In that case, generators could do a heuristic analysis to generate document synopsis based on the document headers. Currently Okular synopsis has to be ready before Okular renders the first page. This can be time-consuming, thus delays the responsiveness.

I propose making document synopsis asynchronous—that is, to have synopsis optionally loaded after the document is rendered. This could give generators more flexibility to provide outlines for documents without embedded ones, while keeping document opening responsive.

This idea was inspired by Sioyek—and I think it would be nice to have it in Okular.

Do you think this is a good idea? I’d be happy to draft a minimal MR for this.

assume by synopsis you mean the table of contents… yes, that seems like a good idea to me.

the order should be text (with image placeholders so text does not jump around as it’s rendered), images, forms&signature block (if enabled), then the table of contents in the side bar… dead last should be any annotations saved to the file.