Text Reflow & annotations in mobile PDF SDK


I have been evaluating your PDFNet Mobile SDK for Android. I have a couple of doubts that I would like to get cleared.

  1. Do you support text reflow?

a. Essentially giving the contents of the pdf in a format that can be displayed on a TextView (preferably as a Spannable object or HTML text) ?

b. If you do support text reflow, does the reflow-able text preserve the original formatting of the pdf (or at least something close to the original formatting)?

  1. Do you have a way to display pages placed horizontally (side by side with horizontal scrolling) instead of vertically (one on top of the other with vertical scrolling)?

  2. What is the format in which highlights and other annotations are created when doing the same from UI? Can these annotations/highlights be serialized and stored and re-applied at a later time?


Regarding text reflow, we provide class called pdftron.PDF.TextExtractor (see TextExtract sample project; http://www.pdftron.com/pdfnet/samplecode.html#TextExtract) that can be used to extract text in the reading order and could be used to populate a TextView.

Besides plain text viewing, TextExtractor can also be used to produce HTML or XML since it also provides styling and positioning info for all content. For example, see code snippet #4 in the above sample.

We are actively working on improving reflow and are planning to announce more advanced features in the near future.

  1. We provide a single page mode, where you swipe horizontally for the next page. However, it’s not a long continuous scrolling. If you need the latter, you could try to rotate the entire PDFViewCtrl by 90 degrees as part of your layout, and then rotate the contents of the PDFViewCtrl 90 degrees in the other direction using PDFViewCtrl.rotateCounterClockwise() or PDFViewCtrl.rotateCounterClockwise().

  2. We do support XFDF, which is a way to export all the annotations from a specific page. Please take a look at the FDFSample in the PDFNetSDKSampleDemo.

You can also take a look at the tool code itself, and then re-apply the steps you took to create an annotation. Tools source code is included as part of the SDK

For more info on annotations and XFDF in PDFNet see: