title: PDFBox image size issues
body: <p>I'm new to working with PdfBox and I'm having a small issue when displaying images. I'm able to import the image, which is sized at 800*900 pixels, and looks fine when viewed in an existing pdf at 100%. However when the resulting PDF is generated using the below code, the image becomes blurry, and the image extends beyond the boundaries of the A4 page. </p>
  
  <p>Is there a different way of sizing/saving images so that they display correctly in pdfbox? </p>
  
  <pre><code>public class PDFtest {
  
  /**
   * @param args the command line arguments
   */
  public static void main(String[] args) throws IOException, COSVisitorException {
      // TODO code application logic here
      // Create a document and add a page to it
      PDDocument document = new PDDocument();
      PDPage page = new PDPage(PDPage.PAGE_SIZE_A4);
      document.addPage(page);
  
      // Create a new font object selecting one of the PDF base fonts
      PDFont font = PDType1Font.HELVETICA_BOLD;
      InputStream in = new FileInputStream(new File("img.jpg"));
      PDJpeg img = new PDJpeg(document, in);
      // Start a new content stream which will "hold" the to be created content
      PDPageContentStream contentStream = new PDPageContentStream(document, page);
  
      // Define a text content stream using the selected font, moving the cursor and drawing the text "Hello World"
  
      contentStream.drawImage(img, 10, 700);
      contentStream.beginText();        
      contentStream.setFont(font, 12);
      contentStream.moveTextPositionByAmount(10, 650);
      contentStream.drawString("Hello World");
      contentStream.endText();
  
      // Make sure that the content stream is closed:
      contentStream.close();
  
      // Save the results and ensure that the document is properly closed:
      document.save("Hello World.pdf");
      document.close();
      }
  </code></pre>