]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Sun, 21 Aug 2011 20:36:24 +0000 (20:36 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Sun, 21 Aug 2011 20:36:24 +0000 (20:36 +0000)
fluidbook/tools/fwstk/src/org/apache/pdfbox/util/PDFStreamEngine.java
fluidbook/tools/fwstk/src/org/apache/pdfbox/util/operator/ShowTextGlyph.java
inc/ws/Metier/class.ws.document.php

index 2759a8332afbaac18f2a617969fbe6d5dbf9cf0d..c5190e60d94510d83091a03e746920a76ef6ce47 100644 (file)
@@ -82,6 +82,7 @@ public class PDFStreamEngine {
        private int validCharCnt;
        private int totalCharCnt;
        protected String currentString;
+       protected String currentOperator;
        /**
         * Flag to skip malformed or otherwise unparseable input where possible.
         */
@@ -156,6 +157,10 @@ public class PDFStreamEngine {
                currentString = s;
        }
 
+       public void setCurrentOperator(String s) {
+               currentOperator = s;
+       }
+
        public boolean isForceParsing() {
                return forceParsing;
        }
@@ -199,8 +204,6 @@ 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;
@@ -377,10 +380,8 @@ public class PDFStreamEngine {
                                String currentChar = Character.toString(currentString.charAt(i));
                                if (!currentChar.equals(c)) {
                                        if (c.toUpperCase().equals(currentChar)) {
-                                               System.out.println("up");
                                                c = c.toUpperCase();
                                        } else if (c.toLowerCase().equals(currentChar)) {
-                                               System.out.println("low");
                                                c = c.toLowerCase();
                                        }
                                }
@@ -407,10 +408,6 @@ public class PDFStreamEngine {
                                }
                        }
 
-                       if (characterHorizontalDisplacementText == 0.0f && ef != null) {
-                               System.out.println(c + ":" + ef.getStringWidth(c));
-                       }
-
                        // multiply the width/height with the scaling factor
                        characterHorizontalDisplacementText = characterHorizontalDisplacementText * fontMatrixXScaling;
                        characterVerticalDisplacementText = characterVerticalDisplacementText * fontMatrixYScaling;
index b61c6dece2fcd5e0fc41e5412129460188079589..5cb9b646839a347c0d613bf19430756be5854250 100644 (file)
@@ -55,7 +55,6 @@ public class ShowTextGlyph extends OperatorProcessor {
                        } else if (next instanceof COSString) {
                                context.setCurrentString(((COSString) next).getString());
                                context.processEncodedText(((COSString) next).getBytes());
-
                        } else {
                                throw new IOException("Unknown type in array for TJ operation:" + next);
                        }
index cb28a31b2861612d3e44185b72b9a510ccb892ee..483641aaf8a8c7fb385ec75aebf56244a0670024 100644 (file)
@@ -400,7 +400,7 @@ class wsDocument extends cubeMetier {
 \r
                $fwstk = new cubeCommandLine('fwstk');\r
                $fwstk->setPath(CONVERTER_PATH);\r
-               $fwstk->setArg('--input ' . $this->in);\r
+               $fwstk->setArg('--input ' . $this->cropped);\r
                $fwstk->setArg('--layout ' . $this->html . 'p%d.layout');\r
                $fwstk->setArg('--cmaps ' . $this->html);\r
                $fwstk->setArg('--fonts' . $this->out . 'fonts/web/');\r