Skip to content

ReaderHighlight: don't try to write page bookmarks into PDF#15097

Merged
hius07 merged 1 commit into
koreader:masterfrom
hius07:fix-write-pdf
Mar 9, 2026
Merged

ReaderHighlight: don't try to write page bookmarks into PDF#15097
hius07 merged 1 commit into
koreader:masterfrom
hius07:fix-write-pdf

Conversation

@hius07

@hius07 hius07 commented Mar 9, 2026

Copy link
Copy Markdown
Member

This change is Reviewable

@Frenzie Frenzie added this to the 2026.02 milestone Mar 9, 2026
@Frenzie Frenzie added the bug label Mar 9, 2026

function ReaderHighlight:writePdfAnnotation(action, item, content)
if self.ui.rolling or not self.highlight_write_into_pdf then
if not (self.document.is_pdf and self.highlight_write_into_pdf and item.drawer) then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is item always defined?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, an existing annotation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be more readable if you had 2 ifs ?

if self.ui.rolling then return end
if [the paging/pdf conditions] then return end

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is_pdf is more informative here than rolling/paging.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

@hius07 hius07 merged commit 5ffbeb5 into koreader:master Mar 9, 2026
4 checks passed
@hius07 hius07 deleted the fix-write-pdf branch March 9, 2026 15:09
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crashes when saving pdf notes

3 participants