Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In this file

http://www.pnas.org/content/suppl/2010/12/10/1014060108.DCSupplemental/Appendix.pdf

starting from page 5, a number of data rows are written. I need these rows in plain text format. How can I extract them?

share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

You can convert the contents of a PDF to plain text utilizing pdftotext.

Just run pdftotext Appendix.pdf and it will spit out an Appendix.txt will all the plain-text in it.

share|improve this answer
    
pdftotext works, using the -raw option –  TMOTTM Feb 25 '13 at 15:54
add comment

What's wrong with simply copying them?

Cartesian coordinates for all structures:

React

6 6.390727 0.132095 4.960391
6 5.969971 -1.321389 4.932512
8 6.229932 -2.095504 5.854485
7 5.288242 -1.652799 3.816634
6 4.675691 -2.942048 3.614359
6 3.234362 -2.800745 3.119131
6 3.107771 -2.046443 1.784738
8 3.907686 -1.094593 1.556228
8 2.188216 -2.443833 1.008985
6 -5.322697 -1.975980 -1.333635
6 -4.229638 -1.620947 -0.307343
16 -2.533574 -1.760488 -0.994608
6 8.431743 -0.064459 -3.050202
6 7.281182 -0.571938 -2.237196
6 7.017856 -0.342487 -0.904258
6 6.208644 -1.400670 -2.720284
7 5.852218 -0.976787 -0.527814
share|improve this answer
    
i should have written that I of course tried to copy the text, which ended up messing up the columns. –  TMOTTM Feb 25 '13 at 15:35
    
"Messing up" how exactly? As you can see above, they seem fine to me. –  Karan Feb 25 '13 at 15:40
    
what viewer are you using from which you are copying the characters? In Preview on Mac OS X, using drag-copy-paste results in the column and row structure not being preserved. Instead, the characters from two or more lines would appear on a single line. –  TMOTTM Feb 25 '13 at 18:08
    
I use Sumatra, but they don't seem to have a version for OS X. –  Karan Feb 25 '13 at 20:31
add comment
  1. Save document to local machine.

  2. http://www.pdfonline.com/pdf-to-word-converter/ will convert pdf to Word. Larger documents may only be partially converted, so you may have to either convert it in blocks.

  3. In Word '07, File --> Options --> Advanced --> "Pasting within document" and "pasting between documents," set to "keep text only."

  4. Cut/paste data in one document into itself, cut/paste from other documents into 1st documents.

After this, you should have 1 big word document in plain text.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.