Hi,

Am 02.02.2011 21:01, schrieb Olivier DOREMIEUX:
With the latest code from SVN, I am getting an Uncompilable source code
exception when doing page.getMediaBox().
Here is a small example. I tryed with different pdf, same problem. I can create
pdf, do other stuff, but not getMediaBox().

try {
PDDocument doc = PDDocument.load(new File(startDir, "mypdf.pdf"));
List allPages = doc.getDocumentCatalog().getAllPages();
for (int i = 0; i < allPages.size(); i++) {
System.out.println("Page " + i);
PDPage page = (PDPage) allPages.get(i);
PDRectangle pageSize = page.getMediaBox();
}
} catch (IOException ex) {
Logger.getLogger(Test1.class.getName()).log(Level.SEVERE, null, ex);
}

Am I the only one to have this problem?
Sorry, but I didn't get the point. What exactly is your problem? Do you get a compile or a runtime error?

BR
Andreas Lehmkühler

Reply via email to