Build configuration
How do I build the source? Is there maven or any other configuration available? Thanks,
For now you just need to compile the source with the jars in /libs added to your buildpath. If you aren't making any changes to the source, there's already a compiled jar in project folder
I'm using the latest jar to extract text from a simple pdf file with a single line but it neither returns the call nor throws any exception. I wanted to debug the PDFTextStripper getText method to know the problem. Below is my code for that
InputStream template = assetManager.open("in.pdf"); PDDocument pdfDoc = PDDocument.load(template); PDFTextStripper stripper = new PDFTextStripper(); String txt = stripper.getText(pdfDoc);
even I wait for long it stucks at getText call. I set 1GB memory for the virtual device.
What font and encoding do you have in this pdf?
I created the pdf using winword font - times new roman encoding - ansi
This time after more than 30 minutes wait it returned the single line of text. Wondering why it took so long! Previously I tried with calibri embedded font.
Well that's something I guess. If you can, try it on a phone. Depending on the computer and emulator settings, it may be really slow. I see that I forgot to commit the latest jar, it will be up later today. It may help with your issue.
I too thought in that line emulator env is one cause of extra time taking. I'll update once test it on a phone.
And, congratulation for your wonderful job of porting the pdfbox to android, it is really working!
on a 2gb ram phone it takes only 3 minutes to extract text from a 100 pages pdf
That's about the expected performance.