Add image cache for pdf docs

Store the rendered image in a member so the image renders quicker at the second selection