Bug 498921 - DjVu annotation feature neglects to use DjVu’s native specs for annotation chunks
Summary: DjVu annotation feature neglects to use DjVu’s native specs for annotation ch...
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: DjVu backend (other bugs)
Version First Reported In: 22.12.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-20 10:24 UTC by kdebugs.grokchem
Modified: 2025-01-20 10:24 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kdebugs.grokchem 2025-01-20 10:24:44 UTC
SUMMARY
Annotations are needlessly lost when saving a file as DjVu.

Some might regard this as a wishlist report but it’s tagged as a bug because information is needlessly lost. A user could spend some time marking up a document with a reasonable (and normal) expectation of saving the work in a single DjVu file. They will be astonished to learn when the try to save that their work can only be preserved if they change the file format to one that locks them to a specific app. Then they must choose between portabilty and data preservation.

STEPS TO REPRODUCE
1. Open an arbitary DjVu file
2. Add a pop-up note
3. File » Save as..
4. change the filetype from `okular` to DjVu

OBSERVED RESULT

This warning emerges:

“You are about to save changes, but the current file format does not support saving the following elements. Please use the Okular document archive format to preserve them. Click Continue to save, but you will lose these elements as well as the undo/redo history.”

EXPECTED RESULT

The DjVu format has a native facility for annotation chunks. So when saving a DjVu file with annotations okular should comply with the spec and produce a DjVu file that contains annotations. The `djvused` tool has support for this, so one option would be to call `djvused`. Another option would be to make whatever library calls djvused uses to store annotations.