Hack to support automatic printing from pdf javascript.
Merge pull request #2839 from brendandahl/auto-print

Hack to support automatic printing from pdf javascript.