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

Renders very pixelated/blocky #3

Closed
Prajwalg19 opened this issue May 29, 2024 · 2 comments
Closed

Renders very pixelated/blocky #3

Prajwalg19 opened this issue May 29, 2024 · 2 comments

Comments

@Prajwalg19
Copy link

I tried tdf on both gnome-terminal and alacritty

  • On alacritty it doesn't render properly. Everything is pixelated. Hardly visible.
  • On gnome-terminal it doesn't launch i get the following error

Couldn't render a page: Couldn't render page: Couldn't paint Context: Invalid Matrix

@itsjunetime
Copy link
Owner

So the issue with alacritty is that it doesn't support image graphics (see this pr), which are necessary to make this work (as it renders pdf pages to pngs, then displays them with ratatui_image). As of right now, ratatui_image renders colors to unicode halfblocks when it can't determine what graphics protocol the current window supports, but that's obviously not very good. Unfortunately, there's no easy way to display PDFs nicely when the terminal doesn't support images. We could try to extract the text and print that out in the terminal, but that would mess up formatting, and sometimes PDFs don't even contain the text they show (e.g. it's stored as an image internally anyways), so that wouldn't work in all cases. I don't think that's an issue we can really fix; I'd just recommend using a different terminal emulator.

And the issue with gnome-terminal is the same as we're seeing in issue #1, so I'll close this in favor of that.

@lucidl
Copy link

lucidl commented Jan 22, 2025

I have the same issue in warp-terminal and lxterminal. Which terminals are working?

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

3 participants