# Reading from a PDF

**URL:** <https://www.ruby-forum.com/t/reading-from-a-pdf/180379>\
**Category:** Ruby\
**Created:** [December 18, 2009, 8:04pm UTC](https://www.ruby-forum.com/t/reading-from-a-pdf/180379 "2009-12-18T20:04:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![paragadosm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c68b51/32.png) [@paragadosm](https://www.ruby-forum.com/u/paragadosm)\
**Post date:** [December 18, 2009, 8:04pm UTC](https://www.ruby-forum.com/t/reading-from-a-pdf/180379/1 "2009-12-18T20:04:51Z")

</div>

I’m looking for a way to read text off of a PDF document in Windows.  
The catch is that this code will get packaged as an ocra executable and  
be run from a pc that does not have Ruby installed. I’ve google  
searched and everything I read talks about needing to modify something  
within the /Windows/System32 folder. I won’t be able to make this  
modification on the pcs that this will be run from (unless ocra does  
something with it when it packages).

Are there any alternatives other than the PDFToolkit? I’m assuming the  
toolkit will not work unless you make those /System32 changes?

---

<div class="post-metadata">

**Author:** ![paragadosm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c68b51/32.png) [@paragadosm](https://www.ruby-forum.com/u/paragadosm)\
**Post date:** [December 18, 2009, 8:21pm UTC](https://www.ruby-forum.com/t/reading-from-a-pdf/180379/2 "2009-12-18T20:21:42Z")

</div>

On Fri, Dec 18, 2009 at 2:04 PM, Max P.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Are there any alternatives other than the PDFToolkit? I’m assuming the  
> toolkit will not work unless you make those /System32 changes?

PDF::Reader is pure ruby but quite low-level.

> **[GitHub - yob/pdf-reader: The PDF::Reader library implements a PDF parser...](https://github.com/yob/pdf-reader)**
>
> The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe. - GitHub - yob/pdf-reader: The PDF::Reader library implements a PDF parser confor...

---

<div class="post-metadata">

**Author:** ![paragadosm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c68b51/32.png) [@paragadosm](https://www.ruby-forum.com/u/paragadosm)\
**Post date:** [December 18, 2009, 8:27pm UTC](https://www.ruby-forum.com/t/reading-from-a-pdf/180379/3 "2009-12-18T20:27:56Z")

</div>

Gregory B. wrote:

> On Fri, Dec 18, 2009 at 2:04 PM, Max P.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Are there any alternatives other than the PDFToolkit? ï¿½I’m assuming the  
> > toolkit will not work unless you make those /System32 changes?
> 
> PDF::Reader is pure ruby but quite low-level.
> 
> [GitHub - yob/pdf-reader: The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe.](http://github.com/yob/pdf-reader)

Thanks for the reply. This looks like what I’m looking for. Man, it’s  
amazing the difference in results you’ll get in google searching for  
“reading from a pdf in ruby” than “pdf reader in ruby” :o)

thanks again!

---

<div class="post-metadata">

**Author:** ![paragadosm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c68b51/32.png) [@paragadosm](https://www.ruby-forum.com/u/paragadosm)\
**Post date:** [September 8, 2010, 9:39pm UTC](https://www.ruby-forum.com/t/reading-from-a-pdf/180379/4 "2010-09-08T21:39:50Z")

</div>

Hey Max P. (chad locke)

did you ever get this to work for you?

-bobsmyph

---

<div class="post-metadata">

**Author:** ![paragadosm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c68b51/32.png) [@paragadosm](https://www.ruby-forum.com/u/paragadosm)\
**Post date:** [September 8, 2010, 10:18pm UTC](https://www.ruby-forum.com/t/reading-from-a-pdf/180379/5 "2010-09-08T22:18:10Z")

</div>

> **[Origami - Parse, Analyze & Forge PDF Documents - Darknet - Hacking Tools,...](https://www.darknet.org.uk/2009/10/origami-parse-analyze-forge-pdf-documents/)**
>
> \[ad\] origami is a Ruby framework designed to parse, analyze, and forge PDF documents. This is NOT a PDF rendering library. It aims at providing a scripting tool to generate and analyze malicious PDF files. As well, it can be used to create on-the-fly...

[http://www.darknet.org.uk/2009/10/origami-parse-analyze-forge-pdf-documents/](http://www.darknet.org.uk/2009/10/origami-parse-analyze-forge-pdf-documents/)

origami is a Ruby framework designed to parse, analyze, and forge PDF  
documents. This is NOT a PDF rendering library. It aims at providing a  
scripting  
tool[http://www.darknet.org.uk/2009/10/origami-parse-analyze-forge-pdf-documents/#](http://www.darknet.org.uk/2009/10/origami-parse-analyze-forge-pdf-documents/#)  
to  
generate and analyze malicious PDF files. As well, it can be used to  
create  
on-the-fly customized PDFs, or to inject (evil) code into already  
existing  
documents.
