[R] read data from pdf file

Dave Roberts droberts at montana.edu
Sat Oct 22 00:09:50 CEST 2005


In linux (and possibly other *nixes) you can view the file with xpdf and 
simply cut and paste it into another window (I use vi) and it's 
converted to ASCII text on the fly.  For large documents you might have 
to scroll quite a bit to convert the whole document, but this process 
has saved my neck a few times.  It does not work with acroread (the 
linux Acobat Reader program) however.

Dave Roberts

Thomas Schönhoff wrote:
> Hi,
> 
> 2005/10/21, Thomas Schönhoff <tschoenhoff at gmail.com>:
> 
>>Hello again,
>>
>>
>>2005/10/21, Thomas Schönhoff <tschoenhoff at gmail.com>:
>>
>>>2005/10/21, Ted Harding <Ted.Harding at nessie.mcc.ac.uk>:
>>>
>>>>On 21-Oct-05 Marco Venanzi wrote:
>>>>
>>>>>Hi, I'm trying to read data from a PDF file.Is it possible to do it
>>>>>with R? Thanks,  Marco
>>
>>>Hmm, if this doesn't work you should have a look to pdftolpe, which is
>>>assumed to convert aribitrary PDF files to some LPE readable format.
>>>LPE is a lightweight programmer's editor, that should be able save the
>>>converted file into txt format.
>>>
>>>I never used this myself, though. In case you are running Windows my
>>>reply might not be of much help, sorry for that!
>>
>>I've to correct myself: its pdftoipe, and ipe (I missed before that is
>>was IPE instead of LPE) is a graphical editor for drawing graphs in PS
>>and PDF. It can save files in XML but has problems to read in PDF
>>created by other programs according to its website:
>>http://ipe.compgeom.org/.
> 
> 
> After looking up I finally found xpdf-utils which might help you to
> convert PDF to text
> At least I was able to convert a PDF file to text by typing:
> 
> pdftotext name.pdf
> 
> at the command line.
> 
> Maybe there will be some drawbacks related to the resulting text
> format (manual adjustments required), but if there is no other way,
> you should give it a shot.
> 
> regards
> 
> Thomas
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 
> 


--




More information about the R-help mailing list