function logPageCount()
{
Log.data("total-page-count", Prince.pageCount); }
Prince.addEventListener("complete", logPageCount, false);
Michael sent this fix to me earlier.
I made this into a file called princessjavascript.js
And this is part of my call in VB.NET where you call the program with --script "princessjavascript.js" on command line
sArguments = sOptions & _
" --script " + quote + sJavascriptFileName + quote + _
" --style " + quote + sStylesheetFileName + quote + _
" --style " + quote + sRemoveTrackingColor + quote + _
" --log " + quote + sLogCurrentName + quote + _
" --output " + quote + sPDFoutputName + quote + _
" --input " + quote + sInputFormat + quote + _
" " + quote + sDocumentFileName + quote
Jim Albright
Wycliffe Bible Translators