Hi,

Am 12.05.2013 06:10, schrieb Pradhan C N:
Hi,
I ran the exmaple org.apache.pdfbox.examples.util.PrintTextLocations with
two different versions of pdfBox. The results are accurate with version
1.8.1. When I run against version 1.6.1 I get incorrect height for the char
glyphs. Is there any extra setting to get the right results while using
1.6.1 ?
No, there isn't. It's simplier than that. A bugfix is responsible for the
improvement. Saying that, you have to update to 1.8.1, if you want accurate
results,

Here's the code snippet I am running

PrintTextLocations printer = new PrintTextLocations();

   List allPages = document.getDocumentCatalog().getAllPages();

   for (int i = 0; i < allPages.size(); i++) {

   PDPage page = (PDPage) allPages.get(i);

   System.out.println("Processing page: " + i);

   PDStream contents = page.getContents();

   if (contents != null) {

    printer.processStream(page, page.findResources(),
page.getContents().getStream());

   }

.......



Thanks,

pradhan

BR
Andreas Lehmkühler


Reply via email to