Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I call the command:

$ xpdf file.pdf -z width -fullscreen

...it does not have the desired effect.

The individual options:

$ xpdf file.pdf -z width

...and:

$ xpdf file.pdf -fullscreen

...work as expected.

Is it possible to achieve the desired effect in xpdf?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Sure enough. This appears to be a bug in xpdf.

You can switch to "width" view easily by tapping w as soon as xpdf opens, but there does not seem to be a way to make it behave from the command line. The only thing I could think of would be to hack it using expect or some sort of keyboard event routing to the X window to send it that keystroke when it starts up.

share|improve this answer
    
tapping w does not work too. In fullscreen mode I can't change the zoom. There is a message in commandline Error: Invalid command syntax: 'zoomFitWidth' when I'm pressing w –  xralf May 3 '11 at 13:56
    
Hm. What version of xpdf? My 3.02 works find and allows me to change the zoom using that keystroke after launching with -fullscreen. –  Caleb May 3 '11 at 14:04
    
I have 3.02 too. –  xralf May 3 '11 at 14:16
    
I found out that it works with w and + or - –  xralf May 3 '11 at 14:22
    
Tapping 'w' works for me, but alas "xpdf -z width foo.pdf" from the command line still fails. –  user7543 Oct 10 at 13:40

I used Evince for this, but I grew tired of the scrollbars. When setting it up for Xpdf, I encountered this very problem. This is a workaround - without exaggerating ;) - that seems to do the trick:

#!/usr/bin/zsh

# This allows you to use xpdf with options, although you're invoking
# it implicitly from Iceweasel. Just pick this script (instead of
# /usr/bin/xpdf) as your PDF reader under Preferences: Applications.

/usr/bin/xpdf -fullscreen -rv $1 &
while (( ! `wmctrl -l | grep Xpdf | wc -l` )) { sleep 0.1 }
xmacroplay "$DISPLAY" < ~/keydowns/xpdf &> /dev/null

# ~/keydowns/xpdf:
#
# KeyStrPress W
# KeyStrRelease W
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.