reddit / emacs

pdf-tools recent errors in rendering .pdfs

nonreligious · 2022-06-11 20:56
I've been using `pdf-tools` for a while without any problems, but this has recently changed, after either a system update or an update to the package. I thought I'd check here before opening an issue on github. Basically, the text/or fonts are just not rendered properly in `pdf-view-mode`, and either looks corrupted or in some cases is simply missing. The issue is most prominent with LaTeX compiled documents - [see this image](https://www.reddit.com/user/nonreligious/comments/va64d2/pdftools/?ref=share&ref_source=link) of a pdf file that was created by exporting from an org file. If I open the pdf in Zathura, it looks perfectly fine, and the same when I switch to `doc-view-mode`. What's even stranger is that this seems to occur totally randomly - some pdfs show up perfectly fine, while others end up looking like gibberish. Sometimes, a minor change in a `.org` file will cause it to export to a perfectly fine pdf (via `C-c C-e l o` after continually showing a scrambled document. Has anyone else had a similar experience? I had an issue a few weeks ago where `epdfinfo` was not compiling properly after an update, but I managed to sort it out by switching to the latest package on Melpa. Using Emacs 27.2, with pdf-tools version 20220522.13 on Manjaro.
Coolneng · 2022-06-11 21:37
I had the same problem, and according to [this issue](https://github.com/vedang/pdf-tools/issues/112) from the pdf-tools repository it seems to be due to an upstream change in poppler. You could try to see if Manjaro has updated to a version later than 22.05, and if not you could build the latest version from source.
nonreligious · 2022-06-11 22:07
Ah I see -- I was looking at issues in the wrong github repository (politza/pdf-tools). I haven't updated in a couple of weeks, but Manjaro tells me that poppler 22.05.0-2 is the latest update available (I am on 22.05.0-1). Hopefully that will fix it. EDIT: Btw, thanks!
[deleted] · 2022-06-12 05:01
[removed]
[deleted] · 2022-06-12 05:10
[removed]
Coolneng · 2022-06-12 10:57
Oh yeah, I was confused about that too vedang is the new maintainer of the package. They mention on the issue that version 22.05.0-2 inclused the fix so you should be good, glad to have helped you! I really panicked when I had to do a presentation and most characters didn't appear, until I found this issue
nonreligious · 2022-06-12 12:43
That's great to hear! Luckily I don't have anything urgent/ have a mupdf based reader available.