Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highlight text on a PDF

I have compiled MuPDF correctly and have been able to run the sample app without an issue, but:

Problem

I want to have a functionality like highlights,underlines, sticky notes, arrows, lines, ovals, rectangles, freehand drawings and text boxes on which user long pressed by his finger, as in RepliGo PDF Reader pdf reader and others.

I searched a lot, but didn't find any relevant way, link or hint to achieve the desired feature.

Can someone share any idea on how to achieve the aforementioned functionality?
It would be even more helpful if someone can explain it by sharing some code or example.

like image 705
Chirag Patel Avatar asked Jan 10 '13 08:01

Chirag Patel


Video Answer


1 Answers

As MuPdf doesn't expose apis for the features you require, I suggest using the PDFTron sdk library for android.

As you can see on their docs page, it supports lot of annotation related pdf features:

Ready-to-Use Tools for Rapid Development - including support for advanced features such as text selection, full text search; links; bookmark navigation and manipulation; interactive forms; various annotation capabilities to enable PDF markup (text highlight, underline, strikeout, squiggly, line, rectangle, ellipse, arrow, sticky note, and free-hand tool mode, etc.).

http://www.pdftron.com/pdfnet/mobile/android_pdf_library.html

like image 85
DEzra Avatar answered Oct 05 '22 13:10

DEzra