Hack to support automatic printing from pdf javascript.

https://bugzilla.mozilla.org/show_bug.cgi?id=843342