Export from pdf to matlab

24 visualizzazioni (ultimi 30 giorni)
Michael
Michael il 23 Feb 2023
Risposto: Walter Roberson il 23 Feb 2023
Is it possible to export the data table from the pdf to matlab? The data in the pdf are saved as text. I would like to copy this data and save it as a matrix.

Risposta accettata

Walter Roberson
Walter Roberson il 23 Feb 2023
-- requires the Text Analytics Toolbox
Reading data from PDF can be a technical challenge. PDF is not designed as a "data container" plus "commands to format containers" like CSS can be. PDF is a Page Description Language, and consists of commands to move to particular positions, draw this and that, and so on.
For example, 'fifth' might be stored in the file as a position for the leading 'f' and then a position for the second 'f', and then a position to draw a single symbol that is a 'th' ligature, and then a position to draw the 'i' close to the first 'f' .
The number of symbols encoded is not necessarily the same as the number of characters, and the positions are not generally one after the other. And the command language includes loops. For example the two 'f' of 'fifth' might be done by preparing an 'f' symbol and then a single command to composite the one symbol to two different locations.
To extract text semi-reliably from a page description language, you have to execute the commands and figure out what the result was.

Più risposte (0)

Categorie

Scopri di più su Language Support in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by