Why did I use a meta tag to provide the verbosity?
Because.. When a javascript file is compiled (ENV variable written to code), the js file never get's updated unless you change it. So if you set the ENV["PDFJS_VIEWER_VERBOSITY"] = "warnings", then start your server, the verbosity will be "warnings".
If you then stop your server and change the ENV variable: ENV["PDFJS_VIEWER_VERBOSITY"] = "errors" and start your server back up, this won't take any affect, because the javascript file stays the same.
But in the view, this is always updated when the view is loaded. (As views are not precompiled).
So I placed the verbosity as a meta tag inside the viewer's view and then write the javscript to set it.
closes #10
Why did I use a
meta
tag to provide the verbosity?Because.. When a javascript file is compiled (ENV variable written to code), the js file never get's updated unless you change it. So if you set the
ENV["PDFJS_VIEWER_VERBOSITY"] = "warnings"
, then start your server, the verbosity will be "warnings". If you then stop your server and change the ENV variable:ENV["PDFJS_VIEWER_VERBOSITY"] = "errors"
and start your server back up, this won't take any affect, because the javascript file stays the same.But in the view, this is always updated when the view is loaded. (As views are not precompiled).
So I placed the verbosity as a
meta
tag inside the viewer's view and then write the javscript to set it./cc @shanear