MATLAB Answers

How to Read PDF file in Matlab?

322 views (last 30 days)
azizullah khan
azizullah khan on 16 Aug 2014
Edited: Walter Roberson on 4 Nov 2017
I want to read pdf file and make some changes in it and then save them in excel.... I have tried my best but fail every time....Need your help....Any effort will be greatly appreciated..Thanks in advance.....

  19 Comments

Geoff Hayes
Geoff Hayes on 27 Aug 2014
Unfortunately, this is not something that I have considered and so am not aware of any other means of reading the pdf into MATLAB. You could always try the pdftotext program.
Naftali
Naftali on 15 Jun 2016
I am no expert but could not find a way to read a pdf file to Matlab. People talk here a bout text, but pdf is usually a series of pics. I go to professional adobe reader and export the pages of the pdf document either by file/save as or by Advanced/Export. This produces a png or jpeg file for each page of the document. From there it is easy in Matlab - loop over the pages with the imread function.
Walter Roberson
Walter Roberson on 15 Jun 2016
pdf is effectively a programming language; you need to execute the commands in order to determine what the output is.

Sign in to comment.

Answers (1)

Christopher Creutzig
Christopher Creutzig on 16 Oct 2017
Edited: Walter Roberson on 4 Nov 2017
Just for the record, Text Analytics Toolbox (new in R2017b) includes a function extractFileText that will extract text data from PDF (or MS Word) files.

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by