how to overcome this?i am able to read some of my pdf using below code, but still some are unreadable?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
clear java
javaaddpath('C:\Users\Hp-Pc\Documents\MATLAB\PDFBox-0.7.3\lib\PDFBox-0.7.3.jar')
pdfdoc = org.pdfbox.pdmodel.PDDocument;
reader = org.pdfbox.util.PDFTextStripper;
pdfdoc = pdfdoc.load('C:\Users\Hp-Pc\Documents\MATLAB\chemical.pdf');
pdfdoc.isEncrypted
%%text, with planty of padding
pdfstr = reader.getText(pdfdoc) %#ok
class(pdfstr)
pdfstr = char(pdfstr) %#ok
class(pdfstr)
%%text 'unpadded'
pdfstr = deblank(pdfstr) %#ok
%%will get an error here..
pdfdoc = pdfdoc.load('C:\Users\Hp-Pc\Documents\MATLAB\chemical.pdf');
pdfdoc.isEncrypted
pdfstr = reader.getText(pdfdoc) %#ok
%%but press forward..
pdfdoc.getDocument().close;
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!