Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Reading data from a PDF file into stata

    Hi everyone,
    R has a function (pdf-tools) to read data from a pdf file and then export it to an excel spreadsheet. I was wondering if STATA has a similar function to do so.
    Best,
    Nader

  • #2
    Not without an intermediary step I believe. You could convert it to a text file & then import- or just copy paste directly into the editor. Or just use R

    Comment


    • #3
      do not think so there is one. Besides, the R's package is based on Java. There might be a way to do this in Java. Google it.

      Comment


      • #4
        I once did something like this by first "printing" the PDF document to a plain text file, reading the text file into Stata (I think that I used -infile-) and then parsing the text using conventional Stata string functions before converting to numeric variables. I wouldn't do that again, given that there is software that you can purchase that converts PDF documents directly to Microsoft Word documents, Excel worksheets and so on.

        But if R's package just calls Java, then this should be more or less directly implementable with an analogous Stata Java plugin.
        Code:
        help java

        Comment

        Working...
        X