*/
public BufferedImage convertToImage() throws IOException
{
int scaling = 2;
int rotation = findRotation();
PDRectangle mBox = findMediaBox();
int width = (int)(mBox.getWidth());//*2);
int height = (int)(mBox.getHeight());//*2);
if( rotation == 90 || rotation == 270 )
{
int tmp = width;
width = height;
height = tmp;