Fixed pdf visible
Style depends only on class, not on DOM
Regenerate visible document only when accessing it, not every time pages are set as visible/hidden