Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Eric-Song-Nop
Copy link
Contributor

Add functionality to preview pdf as text with pdftotext, I am not sure how it behaves on a system without pdftotext. The command line arguments are borrowed from ranger.

@Eric-Song-Nop Eric-Song-Nop changed the title Add pdf preview with pdftotext feat: Add pdf preview with pdftotext Aug 3, 2023
@sxyazi
Copy link
Owner

sxyazi commented Aug 3, 2023

Thanks for the PR!

I'm also thinking of adding PDF preview functionality to yazi, via pdftoppm -- also called poppler. I think it's a much cooler tool than pdftotext, which allows displaying the cover of a PDF as an image and is much more expressive.

image

(The image taken from Telescope-media-files.nvim)

Displaying images is not an issue, yazi aims to provide a more modern interactive experience with multiple image protocols built-in and covering most terminals. And with the pre-caching mechanism, rendering PDF images will not take much time. 😆

@Eric-Song-Nop
Copy link
Contributor Author

That seems to be charming, I might make it work!

@sxyazi sxyazi merged commit 0485259 into sxyazi:main Aug 3, 2023
@sxyazi sxyazi changed the title feat: Add pdf preview with pdftotext feat: add pdf preview with pdftoppm Aug 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants