Bug 695233 - Highlighting tool in MuPDF 1.4 for Android appears to corrupt PDF files
Summary: Highlighting tool in MuPDF 1.4 for Android appears to corrupt PDF files
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: All All
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-14 06:40 UTC by stefan.a
Modified: 2015-04-03 10:33 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Example of a PDF file damaged by highlighting tool (199.62 KB, application/pdf)
2014-05-14 06:41 UTC, stefan.a
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan.a 2014-05-14 06:40:28 UTC
The latest version of MuPDF for Android (1.4, Build 49/armv7a) appears to corrupt the text layer in PDF files when the highlighting or ink annotation tool is used.

Steps to reproduce:
1. On Android, open a PDF file in MuPDF and highlight a passage using the highlighting tool
2. Exit the file and save changes in the process
3. Re-open the file in MuPDF: On the page where highlighting was used (and a couple of pages before/after that), highlighted and surrounding text will not be visible.

Moving the file to my desktop computer and opening the modified PDF confirms these results. The results look identical to Android in MuPDF on the desktop. The same problem appears in Acrobat Reader, although here even more text is missing. Evince still shows all text, but the highlighted part is not displayed correctly (shows as a collection of triangles). All programmes were installed from the Ubuntu 12.04 repositories. I was able to reproduce this in MuPDF 1.4 on a Google Galaxy Nexus and a Google Nexus 7 (2013 model), both installed from Google Play.

See the attached PDF file for comparison (original here: http://www.econ.ohio-state.edu/dejong/note2.pdf)
Comment 1 stefan.a 2014-05-14 06:41:30 UTC
Created attachment 10901 [details]
Example of a PDF file damaged by highlighting tool
Comment 2 Matt Holgate 2014-06-30 04:06:28 UTC
This is a problem in MuPDF's core, so removing the Android tags.
Comment 3 Robin Watts 2015-04-03 10:33:33 UTC
This was to do with the stream length not being updated. Now fixed.