# Using pdf-read package to extract text from pdf file

**URL:** <https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685>\
**Category:** Questions & Answers\
**Created:** [January 29, 2024, 6:52am UTC](https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685 "2024-01-29T06:52:52Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [May 8, 2024, 3:18pm UTC](https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685/25 "2024-05-08T15:18:04Z")

</div>

Hi @tbhanson

With help from Flatt, who provided binaries for arm macs, there is now hope it will work.

I have added `poppler-aarch64-macosx` to `poppler-libs` and updated the dependencies in `racket-popler`. They are put on Github, but there is a little delay until the package server registers the changes.

When the package server is caught up, I expect you can write:

```scheme
raco pkg install poppler-aarch64-macosx

```

to install the binaries and then your test program ought to work.

---

<div class="post-metadata">

**Author:** ![tbhanson](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/tbhanson/32/906_2.png) [@tbhanson](https://racket.discourse.group/u/tbhanson)\
**Post date:** [May 8, 2024, 5:03pm UTC](https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685/26 "2024-05-08T17:03:52Z")

</div>

Many thanks. Can one add github to the list of sources?

```scheme
MacBook-Pro:~ tbh$ raco pkg install poppler-aarch64-macosx
Resolving "poppler-aarch64-macosx" via https://download.racket-lang.org/releases/8.12/catalog/
Resolving "poppler-aarch64-macosx" via https://pkgs.racket-lang.org
Resolving "poppler-aarch64-macosx" via https://planet-compats.racket-lang.org
raco pkg install: cannot find package on catalogs
  package: poppler-aarch64-macosx

```

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [May 8, 2024, 5:51pm UTC](https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685/27 "2024-05-08T17:51:10Z")

</div>

@tbhanson I failed to realize that I needed to make a new package on the package server maually. It wasn't enough to update `poppler-libs`. (It's been a while since a new platform was added.)

The new package is now on the package server, so I hope

```scheme
raco pkg install poppler-aarch64-macosx

```

now works.

See :

> **[poppler-aarch64-macosx](https://pkgs.racket-lang.org/package/poppler-aarch64-macosx)**
>
> native libraries for "racket-poppler" package

---

<div class="post-metadata">

**Author:** ![tbhanson](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/tbhanson/32/906_2.png) [@tbhanson](https://racket.discourse.group/u/tbhanson)\
**Post date:** [May 8, 2024, 6:29pm UTC](https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685/28 "2024-05-08T18:29:01Z")

</div>

Thanks, @soegaard

Yes, I was now able to install.

Unfortunately, when I run the small example (just #lang and the (require...)) DrRacket crashes. The report says it automatically goes to Apple, but please let me know if I can send it elsewhere.

---

<div class="post-metadata">

**Author:** ![soegaard](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/soegaard/32/19_2.png) [@soegaard](https://racket.discourse.group/u/soegaard)\
**Post date:** [May 8, 2024, 6:56pm UTC](https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685/29 "2024-05-08T18:56:32Z")

</div>

@tbhanson  
An issue here would be great:

> **[GitHub - soegaard/racket-poppler: Racket bindings for Poppler (library for...](https://github.com/soegaard/racket-poppler)**
>
> Racket bindings for Poppler (library for reading and generating pdfs) - soegaard/racket-poppler

Also, which version of Racket are you using?  
(The poppler binary needs to match the Cairo binaries built for Racket.)

---

<div class="post-metadata">

**Author:** ![tbhanson](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/tbhanson/32/906_2.png) [@tbhanson](https://racket.discourse.group/u/tbhanson)\
**Post date:** [May 8, 2024, 8:13pm UTC](https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685/30 "2024-05-08T20:13:28Z")

</div>

Thanks:

> <https://github.com/soegaard/racket-poppler/issues/14>
>
> After installing today
> \`
> MacBook-Pro:~ tbh$ raco pkg install poppler-aarch64-m…acosx
> Resolving "poppler-aarch64-macosx" via https://download.racket-lang.org/releases/8.12/catalog/
> Resolving "poppler-aarch64-macosx" via https://pkgs.racket-lang.org
> Downloading repository https://github.com/soegaard/poppler-libs.git?path=poppler-aarch64-macosx commit 029c07225d55593ee38c1bc3fcce2a8a1dd6cdc6
> raco setup: version: 8.12
> \`
> 
> Running this 
> \`
> \#lang racket
> (require racket-poppler )
> \`
> causes DrRacket to crash.
> \[
> \[2024-05-08\_tbh\_DrRacket\_racket-poppler\_crash.pdf\](https://github.com/soegaard/racket-poppler/files/15254292/2024-05-08\_tbh\_DrRacket\_racket-poppler\_crash.pdf)
> \](url)
> cf.
> https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685/28?u=tbhanson

I'm using DrRacket 8.12

[Previous page](https://racket.discourse.group/t/using-pdf-read-package-to-extract-text-from-pdf-file/2685.md?page=1)
