Hello,
i use this viewer because of it's great note taking features. But a last very important thing is missing for me before i want to buy it: I use it also in combination with latex. Here it is important, that it recognizes if the pdf gets changed and updates the view. In the moment nothing is done by the viewer if i update the file. So it is useless for working with latex.
I hope this is not only because i am using this program with wine under linux. At all it would be great to have a linux version so that i can run it without wine. At all such a program is missing in the moment under linux.
Thanks
2.0.42 does not update if pdf is modified from outside
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
timmorn
- User
- Posts: 15
- Joined: Sun Jul 12, 2009 11:47 am
-
Ivan - Tracker Software
- Site Admin
- Posts: 3603
- Joined: Thu Jul 08, 2004 10:36 pm
Re: 2.0.42 does not update if pdf is modified from outside
Yes, viewer doesn't allow you to modify PDF file while it is opened.
As a workaround you can use /close command line option into your PDF generation script into the latex.
As a workaround you can use /close command line option into your PDF generation script into the latex.
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
quant
- User
- Posts: 151
- Joined: Fri Jan 18, 2008 2:48 pm
Re: 2.0.42 does not update if pdf is modified from outside
I use it with latex as well. But as mentioned in another thread, when I close using command line (the last two builds), pdf file won't open on the last visited page (maybe it's only problem with my installation, but I doubt as reverting to older builds everythings works).Ivan - Tracker Software wrote:Yes, viewer doesn't allow you to modify PDF file while it is opened.
As a workaround you can use /close command line option into your PDF generation script into the latex.
-
Wamma
- User
- Posts: 69
- Joined: Thu Feb 07, 2008 3:52 am
Re: 2.0.42 does not update if pdf is modified from outside
I also use PDF XChange with latex. I've found with the latest versions, the previous view is not saved, however, I don't think this problem is related to latex itself. Normal viewing of pdf files will not restore the view from last session. I'm on 64bit Windows 7 and 64bit Vista. I do not have the problem on 32-bit XP (all the latest versions of the viewer).
quant, here is the bash script I use when I generate a pdf with latex, maybe it will be of some use. It supports auto-close and -open of PDF XChange:
quant, here is the bash script I use when I generate a pdf with latex, maybe it will be of some use. It supports auto-close and -open of PDF XChange:
Code: Select all
#!/bin/bash
#
# pdfLaTeX->PDF
# Requires pdf,png,jpg graphics (eps will autoconvert to pdf)
#
# This script's main purpose is to put all the temporary files
# in a working directory to reduce clutter.
#
# Note: if files from other diretories are /included{}, then that directory structure
# must be mirrored in the working directory (see dissertation)
NAME="${1%.*}" # remove the last extension, if there is one
WORK_DIR="working" # this at least needs to be '.'
MAKEIDX_OPT="-s nomencl.ist"
LATEX_OPT=" -halt-on-error -file-line-error -output-directory=$WORK_DIR -shell-escape -interaction nonstopmode"
BIBTEX_OPT="-terse"
SRC_DIR="`pwd`"
# for texlive
#PDFLATEX="/cygdrive/c/apps/general/texlive/bin/win32/pdflatex"
#BIBTEX="/cygdrive/c/apps/general/texlive/bin/win32/bibtex"
# for miktex
PDFLATEX="/cygdrive/c/apps/general/miktex/miktex/bin/pdflatex"
BIBTEX="/cygdrive/c/apps/general/miktex/miktex/bin/bibtex"
# for cygwin tetex
#PDFLATEX="pdflatex"
#BIBTEX="bibtex"
#http://slog.dk/svn/home/jensen/speciale/deliver/thesis/Makefile
TEX_ERROR_RE="\.(tex|out):[0-9][0-9]*|LaTeX Error|Fatal error|Undefined control sequence|Missing number|Runaway Argument|macro parameter character|Illegal"
TEX_RERUN_RE="Rerun|Acronym.*is not defined"
TEX_REF_RE="LaTeX Warning:"
TEX_OVERUNDER_RE="^(Overfull|Underfull)"
TEX_IGNORE_RE="(Marginpar.*moved)"
MAKEIDX="^[^%]*\\(makeindex|nomencl)"
RERUN="LaTeX Warning:.*(There were undefined references.|Rerun)"
RERUNBIB="No file.*\.bbl|LaTeX Warning: Citation.*undefined"
TEX_UNDEFINED="LaTeX Warning: (Label|Reference|Citation)"
# don't include .exe or else the auto-close won't work
#PDF_READER="/cygdrive/c/apps/general/Foxit Reader/Foxit Reader"
PDF_READER="/cygdrive/c/apps/general/PDF-XChange Viewer/PDFXCview"
if [ ! -d $WORK_DIR ]; then
echo "Working directory '$WORK_DIR' not found. Creating..."
mkdir $WORK_DIR
# TEXFILES="find . -name \"*.tex\""
# TEXDIRS="find . \\( -name \".svn\" -o -name \"working\" \\) -prune -o -type d -print0)"
fi
#export TEXINPUTS=.:$WORK_DIR::.. # saving for prosperity-> the :: is required somehow if all processing is moved to the working directory
# TEXMFOUTPUT is only used when target directory is read only
#export TEXMFOUTPUT="$WORK_DIR"
# I now just copy all .bib files in $SRC_DIR to $WORK_DIR
#export BIBINPUTS=..:./"$WORK_DIR"::"$SRC_DIR"
# Remove /dev/null to see output from LaTeX
shopt -s expand_aliases
alias pdflatex_cmd='$PDFLATEX $LATEX_OPT "$NAME" > /dev/null'
alias bibtex_cmd='$BIBTEX $BIBTEX_OPT "$NAME"'
# Note: the above bibtex command is assumed to be run in the working directory
#time {
echo "Running LaTeX..."
if pdflatex_cmd
then
# If Latex tells us to rerun for Bibtex or the bbl or main tex file is older
# than the bib file. NOTE: Making a big assumption here that the only bib
# file in the directory is the one in use!
if ( ls | grep -e "\.bib\b" ) # make sure we have a bib file in the source directory
then
BIBFILE="`ls *.bib`"
if ( egrep -icq "$RERUNBIB" "$WORK_DIR/$NAME.log" || test "$WORK_DIR/$NAME.bbl" -ot "$BIBFILE" || test "$WORK_DIR/$NAME.bbl" -ot "$NAME.tex")
then
if echo "Running BibTeX..." && cd "$WORK_DIR" && cp "$SRC_DIR"/*.bib . && cp "$SRC_DIR"/*.bst . && bibtex_cmd && cd "$SRC_DIR"
then
echo "Running LaTeX..."
pdflatex_cmd
else
cd "$SRC_DIR"
echo "Abort: BibTeX error."
exit 1
fi
fi
fi
test -e "$WORK_DIR/$NAME.glo" && makeindex $MAKEIDX_OPT -o "$WORK_DIR/$NAME.gls" "$WORK_DIR/$NAME.glo"
egrep -i "$RERUN" "$WORK_DIR/$NAME.log" && echo "Rerun 1: LaTeX..." && pdflatex_cmd
egrep -i "$RERUN" "$WORK_DIR/$NAME.log" && echo "Rerun 2: LaTeX..." && pdflatex_cmd
# Print reference warnings:
#egrep -ic "$RERUN" "$WORK_DIR/$NAME.log" &&
egrep -A 3 -B 3 -i "$TEX_UNDEFINED" "$WORK_DIR/$NAME.log"
# If PDF-XChange is installed, it can be closed with a command line switch.
"$PDF_READER" /close "$NAME.pdf"
# this opens and closes the PDF reader as needed -- should work with any PDF reader. If using PDF-XChange, use the above.
# this only works if the PDF reader was opened in a bash shell,
# it will not touch anything opened out of the cygwin environment (because it can't see it)
#PDF_PID=`ps -s | grep "$PDF_READER" | awk '{ print $1 };'` # NOTE: don't change $1, its NOT actually a script variable here, dumbass!
#echo $PDF_PID
#if [ "$PDF_PID" ] && pstree -a $PDF_PID | grep "$NAME"; then
# kill $PDF_PID
#fi
echo "Opening PDF..."
if mv "$WORK_DIR/$NAME.pdf" "$SRC_DIR"
then
"$PDF_READER" "$NAME.pdf" &
else
echo -e "\nPlease close $NAME.pdf in your PDF reader."
fi
else
echo -e "\n*********\n"
egrep -A 5 -B 0 -ie "$TEX_ERROR_RE" "$WORK_DIR/$NAME.log";
echo -e "\n*********"
fi
#end time
#}
# Print undefined, need rerun
#echo -e "\n======= Need Reruns ======="
#egrep -A 5 -B 5 -ie "$TEX_RERUN_RE" "$WORK_DIR/$NAME.log"
#echo "==========================="
# Print warnings on undefined references/citations/labels
#echo -e "\n======= Undefined labels =======\n"
#egrep -A 2 -B 2 -ie "$TEX_REF_RE" "$WORK_DIR/$NAME.log"
#echo "==========================="
# Print warnings on overful/underfull hbox
#egrep -A 5 -B 5 -ie "$TEX_OVERUNDER_RE" "$WORK_DIR/$NAME.log"
# Print ignores
#egrep -A 5 -B 5 -ie "$TEX_IGNORE_RE" "$WORK_DIR/$NAME.log"
-
Stefan - PDF-XChange
- Site Admin
- Posts: 19930
- Joined: Mon Jan 12, 2009 8:07 am
Re: 2.0.42 does not update if pdf is modified from outside
Wamma,
Thanks for the script and as for this problem with not restoring the last viewed page I will point the developers to it.
Regards,
Stefan
Thanks for the script and as for this problem with not restoring the last viewed page I will point the developers to it.
Regards,
Stefan