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

Import from Zotero: application/pdf file doesn't have pdf icon #8930

Closed
2 tasks done
linsui opened this issue Jun 27, 2022 · 8 comments · Fixed by #8935
Closed
2 tasks done

Import from Zotero: application/pdf file doesn't have pdf icon #8930

linsui opened this issue Jun 27, 2022 · 8 comments · Fixed by #8935
Labels
bug Confirmed bugs or reports that are very likely to be bugs external files good first issue An issue intended for project-newcomers. Varies in difficulty. import

Comments

@linsui
Copy link
Contributor

linsui commented Jun 27, 2022

JabRef version

5.6 (latest release)

Operating system

GNU / Linux

Details on version and operating system

No response

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Add a file with application/pdf type
  2. The icon is file
  3. Change the type to PDF
  4. The icon is pdf file.

Appendix

No response

@ThiloteE
Copy link
Member

Could you please elaborate? I am not sure how to reproduce. Screenshots are fine too.

@ThiloteE ThiloteE added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Jun 27, 2022
@linsui
Copy link
Contributor Author

linsui commented Jun 28, 2022

There are icons for the attached files.

图片

In fact these files are all PDF and the icons should be

图片

I change the type from application/pdf to PDF in the bibtex.

@ThiloteE
Copy link
Member

ThiloteE commented Jun 28, 2022

  1. Add a file with application/pdf type
  • What version of Linux is this?

  • What method do you use to attach your pdf to JabRef? e.g. Lookup> Search for unlinked local files (Shift+F7) or is it some other way?

  • Could you please provide the resulting bibtex entry? Basically the data in the {} biblatex source tab.
    How does it look like? Does it look roughly like this?

    @application/pdf{thecitationkey,
    file         = {:yourfile.pdf:PDF},
    }
    

@linsui
Copy link
Contributor Author

linsui commented Jun 28, 2022

What version of Linux is this?

NixOS

What method do you use to attach your pdf to JabRef?

It's exported from Zotero. I can also download a entry with jabref and change the type manully. The result is the same.

Could you please provide the resulting bibtex entry?

file = {Full Text PDF:files/187/Norkin 等。 - 2014 - In-Loop Filters in HEVC.pdf:application/pdf},

@Siedlerchr
Copy link
Member

Replacing application/pdf with PDF after the last colon works. So I guess JabRef does not recognize this when parsing.
file = {Full Text PDF:files/187/Norkin 等。 - 2014 - In-Loop Filters in HEVC.pdf:PDF},

@linsui
Copy link
Contributor Author

linsui commented Jun 28, 2022

Yes, application/pdf is not recognized as PDF.

@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs and removed status: waiting-for-feedback The submitter or other users need to provide more information about the issue labels Jun 28, 2022
@ThiloteE ThiloteE changed the title application/pdf file doesn't have pdf icon Import from Zotero: application/pdf file doesn't have pdf icon Jun 28, 2022
@Siedlerchr Siedlerchr added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Jun 28, 2022
@Siedlerchr
Copy link
Member

return externalFileTypes.fromLinkedFile(linkedFiles.get(0), false)

false needs to the changed to true, so that JabRef correctly searches registered external file types base on mime type.
application/x-latex or any other mime type defined with an icon in the Preference -> External file types

@linsui
Copy link
Contributor Author

linsui commented Jun 29, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs external files good first issue An issue intended for project-newcomers. Varies in difficulty. import
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants