Forum Bugs

You removed --log-stats

joelmeador
You should bring it back.

It has valuable debugging information. For example: total_page_count
moorecp
I would also like to see --log-stats (or a suitable replacement) return.
jim_albright
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

mikeday
This functionality can now be performed with JavaScript, which we hope will offer more flexible options for reporting many other document statistics and data besides page count. We will post more documentation on this topic tomorrow.
joelmeador
Thanks, Mike!
mikeday
Here is some new JavaScript documentation that details the Prince-specific JavaScript interfaces, event handling, and DOM properties that are not yet supported.