fixed flipping glitch and created factory for pdf drawer.