Highlight text on a PDF
Asked Answered
S

1

12

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.

Silvana answered 10/1, 2013 at 8:38 Comment(6)
MuPDF is just an engine to render PDF content. I'm afraid you have to code the rest. You have to handle the user actions you wish, with the behaviour you want. And come back, if you get stuck with an exact problem...Inert
@Chirag Patel did you find any solution for this?Fosdick
MuPDF displays pdf as images. I'm quite sure you can do all your functionalities if your display your pdf files as text.Postpositive
MuPDF is a viewer, what you want is a bit more complex, e.g. Xournal.Hayley
you should use itext library to show pdf and it also has all the features to implement through code you wantShort
try itext, as it shows data in text formUnreserve
S
1

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

Shabby answered 6/1, 2015 at 17:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.