image thumbnail

Extract text from a PDF document

version (164 KB) by Dimitri Shvorob
(if you are lucky)


Updated 4 Apr 2016

View License

The submission calls on PDFTextStripper class of Ben Litchfield's PDFBox Java library to extract text from a PDF document.
1. Download PDFBox library from
2. Download FontBox library from
3. Modify the file paths in pdfParseDemo.m
4. Enable cell mode and step through pdfParseDemo.m

The code does not handle files that have 'Content Copying' permission protected by a password; collaboration to remedy the issue is enthusiastically welcomed!

Cite As

Dimitri Shvorob (2022). Extract text from a PDF document (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!