Package: xpdf
Version: 3.02-15
Thank you for your fixes.
But there are still issues concerning the "-title" option of xpdf.
$ xpdf -title x alpha.pdf
Error: file not found: 'x'
$ xpdf -title "" alpha.pdf
Error: file not found: ''
$ xpdf -title "new title" beta.pdf.gz
doesn't show the "new title".
May I suggest the appended patch?
--
Best regards,
Jörg-Volker.
*** xpdf.orig Wed Jun 22 01:01:57 2011
--- xpdf Wed Jun 22 08:28:20 2011
***************
*** 28,34 ****
-z|-g|-geometry|-remote|-rgb|-papercolor|-eucjp|-t1lib|-ps|-paperw|-paperh)
cmd="$cmd $1 $2" && shift ;;
-title)
! title="$2" ;;
-m)
shift
while [ "$#" -gt "0" ]; do
--- 28,34 ----
-z|-g|-geometry|-remote|-rgb|-papercolor|-eucjp|-t1lib|-ps|-paperw|-paperh)
cmd="$cmd $1 $2" && shift ;;
-title)
! title="$2" ; shift ;;
-m)
shift
while [ "$#" -gt "0" ]; do
***************
*** 41,47 ****
break ;;
-*) cmd="$cmd $1" ;;
*.[pP][Dd][Ff])
! test "$title" != "" || title="Xpdf: $1"
test -f "$1.Z" && cat="zcat" && file="$1.Z" || true
test -f "$1.gz" && cat="zcat" && file="$1.gz" || true
test -f "$1.bz2" && cat="bzcat" && file="$1.bz2" || true
--- 41,47 ----
break ;;
-*) cmd="$cmd $1" ;;
*.[pP][Dd][Ff])
! title=${title:-"Xpdf: $1"}
test -f "$1.Z" && cat="zcat" && file="$1.Z" || true
test -f "$1.gz" && cat="zcat" && file="$1.gz" || true
test -f "$1.bz2" && cat="bzcat" && file="$1.bz2" || true
***************
*** 50,65 ****
test "$cat" = "" && (echo >&2 "Error: file not found: '$1'" && false)
shift && pages="$@" && break ;;
*.gz|*.Z)
! test -f "$1" && cat="zcat" && title="Xpdf: $1" && file="$1" && shift && pages="$@" && break ||
(echo >&2 "Error: file not found: '$1'" && false) ;;
*.bz2)
! test -f "$1" && cat="bzcat" && title="Xpdf: $1" && file="$1" && shift && pages="$@" && break ||
(echo >&2 "Error: file not found: '$1'" && false) ;;
*.xz)
! test -f "$1" && cat="xzcat" && title="Xpdf: $1" && file="$1" && shift && pages="$@" && break ||
(echo >&2 "Error: file not found: '$1'" && false) ;;
*)
! test -f "$1" && cat="cat" && title="Xpdf: $1" && file="$1" && shift && pages="$@" && break ||
(echo >&2 "Error: file not found: '$1'" && false) ;;
esac
shift
--- 50,65 ----
test "$cat" = "" && (echo >&2 "Error: file not found: '$1'" && false)
shift && pages="$@" && break ;;
*.gz|*.Z)
! test -f "$1" && cat="zcat" && title=${title:-"Xpdf: $1"} && file="$1" && shift && pages="$@" && break ||
(echo >&2 "Error: file not found: '$1'" && false) ;;
*.bz2)
! test -f "$1" && cat="bzcat" && title=${title:-"Xpdf: $1"} && file="$1" && shift && pages="$@" && break ||
(echo >&2 "Error: file not found: '$1'" && false) ;;
*.xz)
! test -f "$1" && cat="xzcat" && title=${title:-"Xpdf: $1"} && file="$1" && shift && pages="$@" && break ||
(echo >&2 "Error: file not found: '$1'" && false) ;;
*)
! test -f "$1" && cat="cat" && title=${title:-"Xpdf: $1"} && file="$1" && shift && pages="$@" && break ||
(echo >&2 "Error: file not found: '$1'" && false) ;;
esac
shift
***************
*** 73,79 ****
n="$(expr $n + 2)"
file="$(echo $many | cut -d\' -f$n)"
done
! elif [ "$file" = "" ] || [ "$cat" = "cat" ]; then
eval $cmd \'$file\' $pages
else
tmp=$(tempfile -p "$(basename "$file")" -s .pdf)
--- 73,79 ----
n="$(expr $n + 2)"
file="$(echo $many | cut -d\' -f$n)"
done
! elif [ "$title" = "" ] || [ "$cat" = "cat" ]; then
eval $cmd \'$file\' $pages
else
tmp=$(tempfile -p "$(basename "$file")" -s .pdf)