# Extract information from PDF import

**URL:** https://discourse.jabref.org/t/extract-information-from-pdf-import/2899
**Category:** Features
**Created:** [August 16, 2021, 1:00pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899 "2021-08-16T13:00:44Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![malacology](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@malacology](https://discourse.jabref.org/u/malacology)
#### Post date: [August 16, 2021, 1:00pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/1 "2021-08-16T13:00:45Z")

</div>

I don’t know if JabRef can extract information from PDF, from my view, it can’t be used. After I drag some PDF files into JabRef and read some guide from the PDF import, and nothing correct is extracted.

---

<div class="post-metadata">

### Author: ![Siedlerchr](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/siedlerchr/32/216_2.png) [@Siedlerchr](https://discourse.jabref.org/u/Siedlerchr)
#### Post date: [August 16, 2021, 5:29pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/2 "2021-08-16T17:29:29Z")

</div>

Hi,

we have good news for you. This year’s GSOC student @btut is already working on improved PDF importing and extraction (using GROBID under the hood).

---

<div class="post-metadata">

### Author: ![btut](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/btut/32/1018_2.png) [@btut](https://discourse.jabref.org/u/btut)
#### Post date: [August 16, 2021, 6:10pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/3 "2021-08-16T18:10:39Z")

</div>

Hi!  
Indeed this is a feature I was very much looking forward to myself, that’s why I implemented it 😉  
I am happy to report that most things are done. I am working on some details and working for some changes in Grobid to be accepted, then we have a much more comprehensive pdf import.  
You can track progress [here](https://github.com/JabRef/jabref/pull/7947), but as it depends on Grobid, which is not updated yet, it cannot be tested (you would need to build your own Grobid server from my [Grobid PR](https://github.com/kermitt2/grobid/pull/814) and point JabRef to your server). Expect the feature to be in the main branch in the comming weeks and in the next release!

---

<div class="post-metadata">

### Author: ![malacology](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@malacology](https://discourse.jabref.org/u/malacology)
#### Post date: [August 17, 2021, 3:15am UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/4 "2021-08-17T03:15:12Z")

</div>

I hope I can use this function as soon as possible, it’s very helpful and thanks.

---

<div class="post-metadata">

### Author: ![btut](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/btut/32/1018_2.png) [@btut](https://discourse.jabref.org/u/btut)
#### Post date: [August 30, 2021, 12:45pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/5 "2021-08-30T12:45:00Z")

</div>

Hi @malacology! The new PDF import features are now available in the main branch, but not in the latest release. If you want to try it out already you can try out the builds [here](https://builds.jabref.org/main/).

We use multiple ways of extracting metadata from PDFs now! One of them is [Grobid](https://github.com/kermitt2/grobid), a deep-learning approach. JabRef now runs a Grobid server for that purpose. You will be prompted to allow JabRef to send your PDFs to that service the first time you try to import a pdf. Allow for best results, deny if you don’t want to transmit your files.

I hope this new feature is helpful to you!

---

<div class="post-metadata">

### Author: ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)
#### Post date: [November 28, 2021, 10:50pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/6 "2021-11-28T22:50:19Z")

</div>

Sorry to continuing this old thread. @btut, does this mean that when grobid is activated, it takes precedence over any local XMP metadata that was attached to the pdf file if i import it into Jabref?

I tried using the `write XMP metadata to pdf` feature and metadata was written, but when i import the pdf into another library in Jabref it does not show me data i pushed to the pdf, but rather quite different data.

See here: [Writing XMP metadata to PDFs skips my linked pdf file · Issue #8278 · JabRef/jabref · GitHub](https://github.com/JabRef/jabref/issues/8278)

---

<div class="post-metadata">

### Author: ![btut](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/btut/32/1018_2.png) [@btut](https://discourse.jabref.org/u/btut)
#### Post date: [November 29, 2021, 8:45am UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/7 "2021-11-29T08:45:21Z")

</div>

Hi @ThiloteE!  
Indeed, if Grobid is enabled the importer uses the following order to obtain metadata:

- Look for bibtex entry on first page of pdf
- Look for embedded bib file
- Grobid
- XMP metadata
- Attempt to find metadata on first page (not in bibtex format).

If you want to force an XMP import, you can go to file → import → either to current or new library and select XMP-annotated PDF (last in the drop-down list) in the bottom right corner.

---

<div class="post-metadata">

### Author: ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)
#### Post date: [November 29, 2021, 12:16pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/8 "2021-11-29T12:16:17Z")

</div>

Thank you! This explanation was perfect and after following your advice, i managed to import the XMP metadata that i had pushed to it with the method you posted.

---

<div class="post-metadata">

### Author: ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)
#### Post date: [December 8, 2021, 4:42pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/9 "2021-12-08T16:42:00Z")

</div>

@btut what would be the order for importing if Grobid is not enabled? - The same as above, just without Grobid?

---

<div class="post-metadata">

### Author: ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)
#### Post date: [December 8, 2021, 4:47pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/10 "2021-12-08T16:47:13Z")

</div>

Maybe it would be a good idea to be able to set/change the order (within the preferences).

---

<div class="post-metadata">

### Author: ![malacology](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@malacology](https://discourse.jabref.org/u/malacology)
#### Post date: [December 22, 2021, 3:41pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/11 "2021-12-22T15:41:26Z")

</div>

@btut sorry, I still don’t know how to use the grobid in the newest version. When I import it, it said it would related with grobid server, but can I custom what server should I use?

---

<div class="post-metadata">

### Author: ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)
#### Post date: [December 22, 2021, 5:29pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/12 "2021-12-22T17:29:41Z")

</div>

Hello Malacology,

you can enable the grobid services under `options>preferences>import and export>remote services`.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/jabref/original/2X/9/9a2bc304a276f906e432e86266e8dee03a288674.png)

This is enough and grobid should work just fine.

Alternatively you can link Jabref to other custom/alternative Grobid instances (if you know or have one at your disposal) by entering another url.

---

<div class="post-metadata">

### Author: ![btut](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/btut/32/1018_2.png) [@btut](https://discourse.jabref.org/u/btut)
#### Post date: [December 22, 2021, 6:11pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/13 "2021-12-22T18:11:18Z")

</div>

There should also be the option to read metadata for a pdf from already linked files. In the entry editor, where the files are listed, there should be a button next to the filename (right) which opens a merge dialog that shows metadata from all sources, Grobid being one of them.  
I am not near a computer for the next days so I cannot be more specific. I hope you can find it anyway.

---

<div class="post-metadata">

### Author: ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)
#### Post date: [December 22, 2021, 6:44pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/14 "2021-12-22T18:44:16Z")

</div>

I think this is the button btut is talking about:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/jabref/original/2X/2/242806662e64bc5093710a090a2002f72061e7b2.png)

---

<div class="post-metadata">

### Author: ![btut](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/btut/32/1018_2.png) [@btut](https://discourse.jabref.org/u/btut)
#### Post date: [December 22, 2021, 8:21pm UTC](https://discourse.jabref.org/t/extract-information-from-pdf-import/2899/15 "2021-12-22T20:21:49Z")

</div>

Exactly! Thanks @ThiloteE.
