Comments (6)
Interesting, indeed.
The reason is, that a PDF is treated as single 'image' as it is a single file even though it has multiple sub-images.
This should probably be broken up and behave as if it was separate independent images that then nicely arrange in the grid.
from timg.
Alright, should be fixed now.
Can you do a fresh git pull
, recompile and test with your PDF ?
from timg.
Thank you, works :)
Just a little thing, but that might also be the fault of kitty
-
When I allow height overflow, there is a slight offset within the grid:
timg --grid=2 Oceans\ \(D\)\ -\ Akkorde.pdf -W
Scrolled up:
from timg.
I don't observe that with Kitty, but maybe the PDF has different page sizes ? I have to test for that situation and double check that -W
works in these cases.
(BTW, if you add --auto-crop
unnecessary whitespace around is cropped, so you might get less of the whitespace pixels using up space).
Re-opening now while investigation is going on to reproduce.
from timg.
I am seeing this for any PDF with multiple pages, all A4, even with auto-crop
enabled (which is a good hint, thank you :) )
As said, this is only when the height overflows i.e. each image is bigger than the terminal height. It also happens for images, so this is not PDF-related.
from timg.
So the problem here is, that if you have -W
, a page might be longer than the terminal and have to scroll down a little.
but in the grid, the cursor needs to jump up to the next page.
Now, the way terminals work, they don't allow to jump the cursor beyond the top of the terminal. So if the previos page is a bit longer, the next page will only be displayed starting from the position it could jump to .. slightly down.
So there is nothing we can do about this here.
In the latest release ( https://github.com/hzeller/timg/releases/tag/v1.6.0 ), the resolution of the rendering has been improved. I typically can easily read PDS with --grid=2x1 -U
or even --grid=3x1
(also, it is faster).
So if you read PDFs a lot, this might be an interesting release for you.
from timg.
Related Issues (20)
- carbonyl love?
- Images rendered blurry in fzf preview. HOT 2
- new version not have binary file HOT 7
- No package 'libdeflate' found HOT 2
- ipv4 vs. ipv6 HOT 5
- libsixel is not available on Fedora 38 HOT 2
- Image preview in `lf` HOT 1
- Detected Crash: AddressSanitizer: heap-buffer-overflow HOT 7
- missing size parameter in iterm's protocol HOT 12
- Image viewer with scrolling HOT 3
- Detected memory leaks on timg
- Auto detect for Ghostty doesn't work HOT 8
- Cannot display certain SVG files HOT 6
- can we convert a whole video? HOT 2
- tmux passthrough for other terminals HOT 3
- Cannot read pdf in alpine container HOT 10
- Opensllde Error HOT 5
- Sixel support in foot does not get recongnized correctly HOT 8
- Feature request: support sixel format HOT 2
- Displaying long images starting from the top instead of the bottom HOT 1
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 timg.