• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Working with PDF's

Hey guy's, just wanted to know if anyone had any luck/experience with working with pdf files inside android. More specifically extracting usable data from them.

So far I've tried playing around with PDFbox java library,
get a nice set of warnings

warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.)

even so manages to compile anyway,

however, when attempting to load the pdf file, such as

PDDocument pddDocument = PDDocument.load(url);

causes the Application to crash (Not responding, force close) , on both virtual and real devices, even when surrounded by try, catch statement.

not sure, but the code shouldn't hang the UI either, because that function is run under a new thread such as,

Thread tThread = new Thread(new Runnable()
{
public void run()

ExtractData();
}


seems to be some incompatibility between PDFbox and android, running this as just straight Java works fine.

is their any other way to working with PDF's within android?

... any light on the subject would be greatly appreciated,

Cheers
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones