Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing PDF with 'Any file' filter parses PDF as BibTeX instead of using PdfContentImporter or PdfXmpImporter #7984

Closed
1 task done
btut opened this issue Aug 13, 2021 · 1 comment

Comments

@btut
Copy link
Contributor

btut commented Aug 13, 2021

All files imported without explicitly selecting an importer in the file-choose dialog are parsed as BibTeX files before trying any of the dedicated importers.
This is done in the importUnknownFormat method.
The method:

  • First tries to parse the file (no matter the file type) as BibTeX.
  • Then tries to find a fitting importer

I noticed that with PDF's the BibTeX parser does not fail (but produces unusable results) and therefore the importers that are actually in place to import pdfs are not even used.

Before #694 and in particular f405cf4, the priority was the other way around. First, it was tried to find a fitting importer, if there is none the BibTeX parser would try to read the file.

Why was this changed? Maybe @lenhard remembers something?

I noticed that:

  • moving it back to how it was before Add command line options #694 or
  • removing the BibTeX parsing alltogether (if a .bib file is selected, it is imported using the BibtexImporter anyways

does not result in any failing tests. Are there any objections to moving it back?

JabRef version on

Steps to reproduce the behavior:

  1. File -> import -> import into current library
  2. Select a PDF file
  3. Get an unusable entry for that file
@Siedlerchr
Copy link
Member

Thanks for the investigation, I would move to the status as it was before.

btut added a commit to btut/jabref that referenced this issue Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants