title: java.lang.NoClassDefFoundError: java.awt.geom.Rectangle2D$Double while trying to parse a pdf page to image using pdfrenderer
body: <p>I'm trying to convert a pdf file page into an image using <code>pdfrenderer</code> ,But I'm  getting the below error on compilation. How to rectify this?<br><br>
   my code</p>
  
  <pre><code>File file = new File("image.png");
          System.out.println("Inside readFromFiles!!!!!");
          String fname = new File(getFilesDir(), "Android Tutorial.pdf")
                  .getAbsolutePath();
          FileChannel fChannel = new FileInputStream(fname).getChannel();
          ByteBuffer buffer = fChannel.map(FileChannel.MapMode.READ_ONLY, 0,
                  fChannel.size());
          System.out.println("Buffer" + buffer);
          PDFFile pdfFile = new PDFFile(buffer);
          PDFPage page = pdfFile.getPage(0);
          System.out.println("page" + page);
          Rectangle rect = new Rectangle((int) page.getBBox().getWidth(),
                  (int) page.getBBox().getHeight());
          System.out.println("Rect" + rect);
          Image img = page.getImage(rect.width, rect.height, rect, null);
          System.out.println("img" + img);
          RenderedImage rImage = (RenderedImage) img;
          ImageIO.write(rImage, "png", file);
          System.out.println("Image Created");
  </code></pre>
  
  <p>The errors I get are:</p>
  
  <pre><code>    03-22 10:56:16.834: ERROR/AndroidRuntime(9572): FATAL EXCEPTION: main
      03-2210:56:16.834:ERROR/AndroidRuntime(9572):java.lang.NoClassDefFoundError:java.awt.geom.Rectangle2D$Float
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at com.sun.pdfview.PDFFile.parseRect(PDFFile.java:1523)
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at com.sun.pdfview.PDFFile.createPage(PDFFile.java:1419)
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at com.sun.pdfview.PDFFile.getPage(PDFFile.java:1330)
  
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at com.sun.pdfview.PDFFile.getPage(PDFFile.java:1301)
  
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at com.example.PdfLibraryActivity.PdfLibraryActivity.readFromFiles(PdfLibraryActivity.java:137)
  
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at com.example.PdfLibraryActivity.PdfLibraryActivity.onCreate(PdfLibraryActivity.java:42)
  
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
  
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
  
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  
      03-22 10:56:16.834: ERROR/AndroidRuntime(9572):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
  </code></pre>