Revert PDF size change for normal size images as it distorts the image.

Also incorporates support for text/plain preview generation.