Comments (6)
are you experiencing any lags with your method? AFAIK ranger uses pdftotext
for pdf previews so I'll look into it too
from cfiles.
Ranger does use pdftotext
as default, but there's a commented out code block in scope.sh
in ranger which converts the PDF to image. Looking at it now, ranger
uses pdftoppm
rather than ghostscript
.
It doesn't really lag, ghostscript is quite fast. video
from cfiles.
Check out the latest release and let me know if you encounter any bugs. I tested it on some small PDF documents and it was responsive. Haven't yet tried with bigger sized PDFs
from cfiles.
I think pdftoppm
is somehow inconsistent about the numbering it uses:
I (mostly) couldn't get a PDF preview. The code expects an image preview to be generated with the name "prev-001.jpg", right? My pdftoppm
gives "prev-01.jpg" sometimes:
However adding the -singlefile
option removes the numbering from the output file, resulting in only the extension ".jpg" being added:
I wonder why the numbering is sometimes different?
Thanks for putting in the time to add this feature :) However, it's a bit slow, and for some reason, I'm getting the same PDF preview for different files: video
from cfiles.
Checkout the latest commit. I used the -singlefile
option and now I am not getting same previews for different files. The speed is okay for small PDFs but it can take 1-2s for 40+mb PDFs. For this reason I have made it optional in the config. Try the latest commit and let me know how it works for you
from cfiles.
Perfect! Thank you :)
from cfiles.
Related Issues (20)
- Can't preview image. HOT 3
- Build fails on powerpc 32 bit: 'for' loop initial declaration used outside C99 mode HOT 2
- Error with preview. HOT 2
- Strange behavior opening bash scripts (xdg-open, vim) HOT 17
- Can you add a keybind to create a new folder/file HOT 1
- Auto-reload
- Enhancement: add a help tabble for shortcuts.
- Enhancement: Add a toggle to turn off file preview
- enhancement HOT 1
- Enhancement: copy a file into the same folder
- Enhancement: separate keys to go to next folder and open a file
- error previewing lost+found and root directory
- Preview window/process left open after exit
- BUG Consume all the RAM memory
- Unable to delete folder with same name of a file in trash
- Don't preview zip file after preview pdf
- Images off center on ST terminal HOT 1
- Support transparency
- Crash while move with KEY_UP and KEY_DOWN
- cyrillic folder names are not displayed correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cfiles.