From 02cff384ce72e056a4e9f8a0964f395c0ef5b642 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Sun, 21 Aug 2011 16:42:08 +0000 Subject: [PATCH] --- fluidbook/tools/fwstk/nbproject/project.properties | 8 +++----- .../src/org/apache/pdfbox/util/PDFStreamEngine.java | 9 ++++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fluidbook/tools/fwstk/nbproject/project.properties b/fluidbook/tools/fwstk/nbproject/project.properties index 9c3a89676..2bb20f19c 100644 --- a/fluidbook/tools/fwstk/nbproject/project.properties +++ b/fluidbook/tools/fwstk/nbproject/project.properties @@ -32,7 +32,6 @@ file.reference.bcprov-jdk16-146.jar=H:\\Works\\Java\\jar\\bcprov-jdk16-146.jar file.reference.commons-logging-1.1.1.jar=H:\\Works\\Java\\jar\\commons-logging-1.1.1.jar file.reference.fontbox-1.6.0.jar=H:\\Works\\Java\\jar\\fontbox-1.6.0.jar file.reference.FWSTK_Resources.jar=..\\FWSTK_Resources\\dist\\FWSTK_Resources.jar -file.reference.icu4j-4_6_1.jar=H:\\Works\\Java\\jar\\icu4j-4_6_1.jar file.reference.Java-resources=../../../../Java/resources file.reference.jempbox-1.6.0.jar=H:\\Works\\Java\\jar\\jempbox-1.6.0.jar file.reference.pdfbox-1.6.0.jar=H:\\Works\\Java\\jar\\pdfbox-1.6.0.jar @@ -43,14 +42,13 @@ jar.compress=false jar.index=${jnlp.enabled} javac.classpath=\ ${file.reference.avalon-framework-4.1.4.jar}:\ - ${file.reference.icu4j-4_6_1.jar}:\ ${file.reference.bcprov-jdk16-146.jar}:\ ${file.reference.bcmail-jdk16-146.jar}:\ ${file.reference.commons-logging-1.1.1.jar}:\ - ${file.reference.jempbox-1.6.0.jar}:\ + ${file.reference.FWSTK_Resources.jar}:\ ${file.reference.fontbox-1.6.0.jar}:\ - ${file.reference.pdfbox-1.6.0.jar}:\ - ${file.reference.FWSTK_Resources.jar} + ${file.reference.jempbox-1.6.0.jar}:\ + ${file.reference.pdfbox-1.6.0.jar} # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false diff --git a/fluidbook/tools/fwstk/src/org/apache/pdfbox/util/PDFStreamEngine.java b/fluidbook/tools/fwstk/src/org/apache/pdfbox/util/PDFStreamEngine.java index 30c61bfe5..2759a8332 100644 --- a/fluidbook/tools/fwstk/src/org/apache/pdfbox/util/PDFStreamEngine.java +++ b/fluidbook/tools/fwstk/src/org/apache/pdfbox/util/PDFStreamEngine.java @@ -199,6 +199,8 @@ public class PDFStreamEngine { * @throws IOException if there is an error accessing the stream. */ public void processStream(PDPage aPage, PDResources resources, COSStream cosStream) throws IOException { + System.out.println("blabla"); + graphicsState = new PDGraphicsState(aPage.findCropBox()); textMatrix = null; textLineMatrix = null; @@ -382,7 +384,8 @@ public class PDFStreamEngine { c = c.toLowerCase(); } } - } catch (NullPointerException | StringIndexOutOfBoundsException e) { + } catch (NullPointerException e) { + } catch (StringIndexOutOfBoundsException e1) { } @@ -399,13 +402,13 @@ public class PDFStreamEngine { ef = this.getExternalFont(font.getBaseFont()); if (ef != null) { - characterHorizontalDisplacementText = Math.max(ef.getFontWidth(string, i, codeLength),ef.getStringWidth(c)); + characterHorizontalDisplacementText = Math.max(ef.getFontWidth(string, i, codeLength), ef.getStringWidth(c)); characterVerticalDisplacementText = ef.getFontHeight(string, i, codeLength); } } if (characterHorizontalDisplacementText == 0.0f && ef != null) { - System.out.println(c+":"+ef.getStringWidth(c)); + System.out.println(c + ":" + ef.getStringWidth(c)); } // multiply the width/height with the scaling factor -- 2.39.5