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

PDF rendering #180

Closed
arisolt opened this issue Mar 18, 2024 · 2 comments
Closed

PDF rendering #180

arisolt opened this issue Mar 18, 2024 · 2 comments

Comments

@arisolt
Copy link

arisolt commented Mar 18, 2024

Chromium uses the library Pdfium for rendering PDFs. Opening either a local or remote PDF file with carbonyl doesn't seem to work, just a blank screen.

./carbonyl "https://dagrs.berkeley.edu/sites/default/files/2020-01/sample.pdf"

I was hoping to use carbonyl to view PDFs in the terminal. Can this be enabled?

@Emasoft
Copy link

Emasoft commented Jul 15, 2024

I think it would be useless. Pdfium converts (rasterize) the PDF text to a bitmap image to display it. And images in carbonyl have a resolution limited by the current terminal screen size (the number of rows and columns). So unless your term client window can display a 1024 columns and 768 rows screen, you are getting just blurry lines instead of text.
Maybe you need a custom version of Pdfium using Carbonyl internally to render the pdf text, but that would need a lot of work. What about using a PdF to html converter first?

@arisolt
Copy link
Author

arisolt commented Jul 15, 2024

What about using a PdF to html converter first?

Thanks, that's a very good idea!

@arisolt arisolt closed this as completed Jul 15, 2024
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