Bug 695271

Summary: some pdf file cannot be annotated
Product: MuPDF Reporter: beasonshu <beasonshu>
Component: mupdfAssignee: MuPDF bugs <mupdf-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: beasonshu, matt, robin.watts, zeniko
Priority: P4    
Version: 1.4   
Hardware: All   
OS: OpenBSD   
Customer: Word Size: ---
Attachments: file that can not be annotated

Description beasonshu 2014-05-28 19:02:21 UTC

    
Comment 1 beasonshu 2014-05-28 19:05:10 UTC
Created attachment 10946 [details]
file that can not be annotated

the attachement is pdf file that can not be annotated in mupdf of android.
Comment 2 zeniko 2014-05-29 06:25:28 UTC
The problem seems to be that this file doesn't end in a newline which causes reparation to miss the first object in an incremental update. Adding a newline as in https://code.google.com/p/sumatrapdf/source/detail?r=8968 fixes this for me.
Comment 3 Matt Holgate 2014-06-30 03:59:48 UTC
OK, since this problem is related to the MuPDF core, rather than Android specific, I'll remove the Android tags..
Comment 4 Robin Watts 2015-04-03 08:56:31 UTC
Fixed in:

commit 1e91bb1c4b55060809154ff7ba6f210f74499c4b
Author: Simon Bünzli <zeniko@gmail.com>
Date:   Fri Jul 18 15:16:06 2014 +0200

    Bug 695271: fix incremental updates for files without final linebreak

    PDF documents aren't required to end in a linebreak. Objects however
    must start on their own line (in particular for broken documents
    relying on reparation). For this reason, a linebreak must be inserted
    before starting an incremental update.