dsanson / termpdf

barebones graphical pdf/djvu/cbr/image viewer that works inside iTerm2 2.9+ and Kitty
MIT License
637 stars 24 forks source link

termpdf doesn't open files #7

Closed jerryajay closed 8 years ago

jerryajay commented 8 years ago

I followed the installation procedures correctly. I encounter this error when I trying to open a pdf file:

prompt> termpdf lab1.pdf 
(standard_in) 1: syntax errorermpdf lab1.pdf                                                                                                                                                   
(standard_in) 1: syntax error
(standard_in) 2: syntax erroror
(standard_in) 1: syntax error
(standard_in) 1: syntax error[3;3R

/home/jerry/bin/termpdf: line 208: + (190 *  / 2) - (0 / 2): syntax error: operand expected (error token is "/ 2) - (0 / 2)")
prompt> 1054;1918t;52;191t3Rc
dklesev commented 8 years ago

i confirm the same error. Seems that vars get computed incorrectly (on my system)

--------------------
xPos: 
yPos: 
width: 170
height: 33
x_factor: 
y_factor: 
w: 0
h: 0
--------------------

INFO:

GNU bash, Version 4.3.30(1)-release (x86_64-pc-linux-gnu)

and why so complicated and not use tput f.e.?

rahulpathakgit commented 8 years ago

I am getting same error -

/usr/bin/termpdf: line 208: + (238 * / 2) - (0 / 2): syntax error: operand expected (error token is "/ 2) - (0 / 2)") 1054;1918t;62;239t3R

env - Linux ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:18:00 UTC 2015 i686 i686 i686 GNU/Linux

dsanson commented 8 years ago

I've removed the broken support for X11. w3mimgdisplay sizes images in pixels, but it is hard to get the size of a pane in tmux in pixels, as opposed to characters. My attempts to put something together that would calculate the pixels from the characters was not very successful!