You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ju...@apache.org on 2008/08/05 12:51:26 UTC

svn commit: r682665 [6/21] - in /incubator/pdfbox/trunk/src: org/pdfbox/ org/pdfbox/ant/ org/pdfbox/cos/ org/pdfbox/encoding/ org/pdfbox/encryption/ org/pdfbox/examples/ org/pdfbox/examples/fdf/ org/pdfbox/examples/pdmodel/ org/pdfbox/examples/persiste...

Modified: incubator/pdfbox/trunk/src/org/pdfbox/io/RandomAccessFileOutputStream.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/io/RandomAccessFileOutputStream.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/io/RandomAccessFileOutputStream.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/io/RandomAccessFileOutputStream.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.io;
 
@@ -62,11 +62,11 @@
     {
         return position;
     }
-    
+
     /**
      * Get the amount of data that was actually written to the stream, in theory this
      * should be the same as the length specified but in some cases it doesn't match.
-     * 
+     *
      * @return The number of bytes actually written to this stream.
      */
     public long getLengthWritten()
@@ -138,4 +138,4 @@
     {
         expectedLength = value;
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/io/RandomAccessFileOutputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/BaseParser.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/BaseParser.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/BaseParser.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/BaseParser.java Tue Aug  5 03:51:13 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -55,7 +55,7 @@
     /**
      * This is a byte array that will be used for comparisons.
      */
-    public static final byte[] ENDSTREAM = 
+    public static final byte[] ENDSTREAM =
         new byte[] {101,110,100,115,116,114,101,97,109};//"endstream".getBytes( "ISO-8859-1" );
 
     /**
@@ -82,7 +82,7 @@
      * Constructor.
      *
      * @param input The input stream to read the data from.
-     * 
+     *
      * @throws IOException If there is an error reading the input stream.
      */
     public BaseParser( InputStream input) throws IOException
@@ -90,22 +90,22 @@
         //pdfSource = new PushBackByteArrayStream( input );
         pdfSource = new PushBackInputStream( new BufferedInputStream( input, 16384 ), 4096 );
     }
-    
+
     /**
      * Constructor.
      *
      * @param input The array to read the data from.
-     * 
+     *
      * @throws IOException If there is an error reading the byte data.
      */
     protected BaseParser(byte[] input) throws IOException
     {
         pdfSource = new ByteArrayPushBackInputStream(input);
     }
-    
+
     /**
      * Set the document for this stream.
-     * 
+     *
      * @param doc The current document.
      */
     public void setDocument( COSDocument doc )
@@ -115,8 +115,8 @@
 
     private static boolean isHexDigit(char ch)
     {
-        return (ch >= '0' && ch <= '9') || 
-        (ch >= 'a' && ch <= 'f') || 
+        return (ch >= '0' && ch <= '9') ||
+        (ch >= 'a' && ch <= 'f') ||
         (ch >= 'A' && ch <= 'F');
         // the line below can lead to problems with certain versions of the IBM JIT compiler
         // (and is slower anyway)
@@ -254,9 +254,9 @@
             //a CRLF or LF but nothing else.
 
             int whitespace = pdfSource.read();
-            
+
             //see brother_scan_cover.pdf, it adds whitespaces
-            //after the stream but before the start of the 
+            //after the stream but before the start of the
             //data, so just read those first
             while (whitespace == 0x20)
             {
@@ -483,7 +483,7 @@
                 braces--;
                 byte[] nextThreeBytes = new byte[3];
                 int amountRead = pdfSource.read(nextThreeBytes);
-                
+
                 //lets handle the special case seen in Bull  River Rules and Regulations.pdf
                 //The dictionary looks like this
                 //    2 0 obj
@@ -578,7 +578,7 @@
                             {
                                 octal.append( digit );
                             }
-                            else 
+                            else
                             {
                                 nextc = c;
                             }
@@ -586,7 +586,7 @@
                         else
                         {
                             nextc = c;
-                        }   
+                        }
 
                         int character = 0;
                         try
@@ -629,7 +629,7 @@
             {
                 c = nextc;
             }
-            else 
+            else
             {
                 c = pdfSource.read();
             }
@@ -1037,7 +1037,7 @@
         skipSpaces();
 
         int c = pdfSource.read();
-        
+
         //average string size is around 2 and the normal string buffer size is
         //about 16 so lets save some space.
         StringBuffer buffer = new StringBuffer(length);
@@ -1068,14 +1068,14 @@
     {
         return isClosing(pdfSource.peek());
     }
-    
+
     /**
      * This will tell if the next character is a closing brace( close of PDF array ).
      *
      * @param c The character to check against end of line
      * @return true if the next byte is ']', false otherwise.
      */
-    protected boolean isClosing(int c) 
+    protected boolean isClosing(int c)
     {
         return c == ']';
     }
@@ -1095,7 +1095,7 @@
             c = pdfSource.read();
         }
         StringBuffer buffer = new StringBuffer( 11 );
-        
+
         while( !isEOL(c) && c != -1 )
         {
             buffer.append( (char)c );
@@ -1123,7 +1123,7 @@
     {
         return isEOL(pdfSource.peek());
     }
-    
+
     /**
      * This will tell if the next byte to be read is an end of line byte.
      *
@@ -1182,7 +1182,7 @@
                     c = pdfSource.read();
                 }
             }
-            else 
+            else
             {
                 c = pdfSource.read();
             }
@@ -1221,7 +1221,7 @@
         {
             pdfSource.unread( lastByte );
         }
-             
+
         try
         {
             retval = Integer.parseInt( intBuffer.toString() );
@@ -1252,4 +1252,4 @@
     {
         return xrefs;
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/BaseParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFObjectStreamParser.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFObjectStreamParser.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFObjectStreamParser.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFObjectStreamParser.java Tue Aug  5 03:51:13 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -81,7 +81,7 @@
             {
                 object = new COSObject(cosObject);
                 object.setGenerationNumber( COSInteger.ZERO );
-                COSInteger objNum = 
+                COSInteger objNum =
                     new COSInteger( ((Integer)objectNumbers.get( objectCounter)).intValue() );
                 object.setObjectNumber( objNum );
                 streamObjects.add( object );
@@ -104,4 +104,4 @@
     {
         return streamObjects;
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFObjectStreamParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFParser.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFParser.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFParser.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFParser.java Tue Aug  5 03:51:13 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -143,7 +143,7 @@
 
             try
             {
-                float pdfVersion = Float.parseFloat( 
+                float pdfVersion = Float.parseFloat(
                     header.substring( PDF_HEADER.length(), Math.min( header.length(), PDF_HEADER.length()+3) ) );
                 document.setVersion( pdfVersion );
             }
@@ -236,7 +236,7 @@
     {
         skipSpaces();
         int c = pdfSource.peek();
-        
+
         if( !Character.isDigit( (char)c ) )
         {
             // Fill bytes conform with PDF reference (but without comment sign)
@@ -326,7 +326,7 @@
             {
                 object = parseXrefSection();
             }
-            
+
             //if peeked char is xref or startxref
             if( peekedChar == 'x' || peekedChar == 's')
             {
@@ -417,7 +417,7 @@
                 genNum = readInt();
 
                 objectKey = readString( 3 );
-                //System.out.println( "parseObject() num=" + number + 
+                //System.out.println( "parseObject() num=" + number +
                 //" genNumber=" + genNum + " key='" + objectKey + "'" );
                 if( !objectKey.equals( "obj" ) )
                 {
@@ -477,7 +477,7 @@
                             {
                                 //found a case with 17506.pdf object 41 that was like this
                                 //41 0 obj [/Pattern /DeviceGray] ] endobj
-                                //notice the second array close, here we are reading it 
+                                //notice the second array close, here we are reading it
                                 //and ignoring and attempting to continue
                                 pdfSource.read();
                             }
@@ -521,7 +521,7 @@
      * This will parse the xref table from the stream.
      *
      * It stores the starting object number and the count
-     * 
+     *
      * @param params The start and count parameters
      *
      * @throws IOException If an IO error occurs.

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFStreamParser.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFStreamParser.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFStreamParser.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFStreamParser.java Tue Aug  5 03:51:13 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,7 +62,7 @@
         super( stream );
         file = raf;
     }
-    
+
     /**
      * Constructor.
      *
@@ -277,7 +277,7 @@
             case 'I':
             {
                 //ImageParameters imageParams = lastBIToken.getImageParameters();
-                
+
                 //int expectedBytes = (int)Math.ceil(imageParams.getHeight() * imageParams.getWidth() *
                 //                    (imageParams.getBitsPerComponent()/8) );
                 //Special case for ID operator
@@ -381,4 +381,4 @@
         }
         return buffer.toString();
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFStreamParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFXref.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFXref.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFXref.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFXref.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfparser;
 
@@ -79,4 +79,4 @@
     {
         start = newStart;
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfparser/PDFXref.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ArrayEntry.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ArrayEntry.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ArrayEntry.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ArrayEntry.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfviewer;
 
@@ -66,4 +66,4 @@
     {
         index = i;
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ArrayEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/MapEntry.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/MapEntry.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/MapEntry.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/MapEntry.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfviewer;
 
@@ -88,4 +88,4 @@
         }
         return retval;
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/MapEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFPagePanel.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFPagePanel.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFPagePanel.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFPagePanel.java Tue Aug  5 03:51:13 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,7 +42,7 @@
 
     /**
      * Constructor.
-     * 
+     *
      * @throws IOException If there is an error creating the Page drawing objects.
      */
     public PDFPagePanel() throws IOException
@@ -80,4 +80,4 @@
             e.printStackTrace();
         }
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFPagePanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeCellRenderer.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeCellRenderer.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeCellRenderer.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfviewer;
 
@@ -53,7 +53,7 @@
         boolean componentHasFocus)
     {
         nodeValue = convertToTreeObject( nodeValue );
-        return super.getTreeCellRendererComponent( tree, nodeValue, isSelected, expanded, leaf, 
+        return super.getTreeCellRendererComponent( tree, nodeValue, isSelected, expanded, leaf,
                 row, componentHasFocus );
     }
 
@@ -127,4 +127,4 @@
         return nodeValue;
 
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeCellRenderer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeModel.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeModel.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeModel.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeModel.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfviewer;
 
@@ -315,4 +315,4 @@
     {
         //required for interface
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PDFTreeModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageDrawer.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageDrawer.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageDrawer.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageDrawer.java Tue Aug  5 03:51:13 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -61,10 +61,10 @@
 
     private List lineSubPaths = new ArrayList();
     private GeneralPath linePath = new GeneralPath();
-    
+
     /**
      * Default constructor, loads properties from file.
-     * 
+     *
      * @throws IOException If there is an error loading properties from the file.
      */
     public PageDrawer() throws IOException
@@ -86,7 +86,7 @@
         graphics = (Graphics2D)g;
         page = p;
         pageSize = pageDimension;
-        
+
         graphics.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
         PDResources resources = page.findResources();
         processStream( page, resources, page.getContents().getStream() );
@@ -104,7 +104,7 @@
                     appearanceName = "default";
                 }
                 Map appearanceMap = appearDictionary.getNormalAppearance();
-                PDAppearanceStream appearance = 
+                PDAppearanceStream appearance =
                     (PDAppearanceStream)appearanceMap.get( appearanceName );
                 if( appearance != null )
                 {
@@ -120,16 +120,16 @@
         // 2 - Rotate
         // 3 - Scale
         // Refer to PDFReference p176 (or 188 in xpdf)
-        /*AffineTransform transform = graphics.getTransform();        
+        /*AffineTransform transform = graphics.getTransform();
         transform.setToTranslation( 0, page.findMediaBox().getHeight()/2 );
         transform.setToRotation((double)p.getRotation());
-        transform.setTransform( 1, 0, 0, 1, 0, 0 );        
+        transform.setTransform( 1, 0, 0, 1, 0, 0 );
         transform.setToScale( 1, 1 );
-        
+
         AffineTransform rotation = graphics.getTransform();
         rotation.rotate( (page.findRotation() * Math.PI) / 180d );
         graphics.setTransform( rotation );*/
-        
+
     }
 
     /**
@@ -144,10 +144,10 @@
         //the font color is black
         try
         {
-            if( this.getGraphicsState().getTextState().getRenderingMode() == PDTextState.RENDERING_MODE_FILL_TEXT ) 
+            if( this.getGraphicsState().getTextState().getRenderingMode() == PDTextState.RENDERING_MODE_FILL_TEXT )
             {
                 graphics.setColor( this.getGraphicsState().getNonStrokingColorSpace().createColor() );
-            } 
+            }
             else if( this.getGraphicsState().getTextState().getRenderingMode() == PDTextState.RENDERING_MODE_STROKE_TEXT )
             {
                 graphics.setColor( this.getGraphicsState().getStrokingColorSpace().createColor() );
@@ -165,40 +165,40 @@
             io.printStackTrace();
         }
     }
-    
+
     /**
      * Get the graphics that we are currently drawing on.
-     * 
+     *
      * @return The graphics we are drawing on.
      */
     public Graphics2D getGraphics()
     {
         return graphics;
     }
-    
+
     /**
      * Get the page that is currently being drawn.
-     * 
+     *
      * @return The page that is being drawn.
      */
     public PDPage getPage()
     {
         return page;
     }
-    
+
     /**
      * Get the size of the page that is currently being drawn.
-     * 
+     *
      * @return The size of the page that is being drawn.
      */
     public Dimension getPageSize()
     {
         return pageSize;
     }
-    
+
     /**
      * Fix the y coordinate based on page rotation.
-     * 
+     *
      * @param x The x coordinate.
      * @param y The y coordinate.
      * @return The updated y coordinate.
@@ -207,10 +207,10 @@
     {
     	return pageSize.getHeight() - y;
     }
-    
+
     /**
      * Get the current line path to be drawn.
-     * 
+     *
      * @return The current line path to be drawn.
      */
     public GeneralPath getLinePath()
@@ -220,7 +220,7 @@
 
     /**
      * Set the line path to draw.
-     * 
+     *
      * @param newLinePath Set the line path to draw.
      */
     public void setLinePath(GeneralPath newLinePath)
@@ -231,10 +231,10 @@
             linePath.append (newLinePath, false);
         }
     }
-    
+
     /**
      * Get the current list of line paths to be drawn.
-     * 
+     *
      * @return The current list of line paths to be drawn.
      */
     public List getLineSubPaths()
@@ -244,7 +244,7 @@
 
     /**
      * Set the list of line paths to draw.
-     * 
+     *
      * @param newLineSubPaths Set the list of line paths to draw.
      */
     public void setLineSubPaths(List newLineSubPaths)
@@ -252,21 +252,21 @@
         lineSubPaths = newLineSubPaths;
     }
 
-    	
+
     /**
      *
      * Fill the path
-     * 
+     *
      * @param windingRule The winding rule this path will use.
      */
     public void fillPath(int windingRule) throws IOException{
-    	
+
     	graphics.setColor( getGraphicsState().getNonStrokingColorSpace().createColor() );
-        
+
         //logger().info("Filling the path with rule: " + windingRule);
-        
+
     	getLinePath().setWindingRule(windingRule);
-        
+
     	graphics.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );
         List subPaths = getLineSubPaths();
         for( int i=0; i<subPaths.size(); i++ )
@@ -277,16 +277,16 @@
             }
             graphics.fill( subPath );
         }
-        
+
             graphics.fill( getLinePath() );
             getLinePath().reset();
     }
-    
-        
+
+
     public void setStroke(BasicStroke newStroke){
     	getGraphics().setStroke( newStroke );
     }
-    
+
     public void StrokePath() throws IOException{
     	graphics.setColor( getGraphicsState().getStrokingColorSpace().createColor() ); //per Ben's 11/15 change in StrokePath.java
         List subPaths = getLineSubPaths();
@@ -300,24 +300,24 @@
         graphics.draw( path );
         path.reset();
     }
-    
+
     //If you need to do anything when a color changes, do it here ... or in an override of this function
     public void ColorChanged(Boolean bStroking) throws IOException{
         logger().info("changing " + (bStroking ? "" : "non") + "stroking color");
     }
-    
+
     //This code generalizes the code Jim Lynch wrote for AppendRectangleToPath
     public java.awt.geom.Point2D.Double TransformedPoint (double x, double y){
-        
+
         double scaleX = 0.0;
         double scaleY = 0.0;
         double transX = 0.0;
         double transY = 0.0;
-        
+
         double finalX = x;
         double finalY = y;
-        
-        //Get the transformation matrix 
+
+        //Get the transformation matrix
         Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
         AffineTransform at = ctm.createAffineTransform();
 
@@ -325,28 +325,28 @@
         scaleY = at.getScaleY();
         transX = at.getTranslateX();
         transY = at.getTranslateY();
-        
+
         Point2D Pscale = ScaledPoint (finalX, finalY, scaleX, scaleY);
         finalX = Pscale.getX();
         finalY = Pscale.getY();
-        
+
         finalX += transX;
       	finalY += transY;
-	
+
         finalY = fixY( finalX, finalY );
         finalY -= .6;
-        
+
         return new java.awt.geom.Point2D.Double(finalX, finalY);
     }
-    
+
     //Use ScaledPoint rather than TransformedPoint in situations where most of the translation
     //need not be repeated.
     //Consider, for example, the second coordinate of a rectangle.
     public java.awt.geom.Point2D.Double ScaledPoint (double x, double y, double scaleX, double scaleY){
-        
+
         double finalX = 0.0;
         double finalY = 0.0;
-        
+
         if(scaleX > 0)
     	{
 	    	finalX = x * scaleX;
@@ -355,20 +355,20 @@
         {
         	finalY = y * scaleY;
     	}
-        
+
         return new java.awt.geom.Point2D.Double(finalX, finalY);
     }
-    
+
     public java.awt.geom.Point2D.Double ScaledPoint (double x, double y){
-        
+
         double scaleX = 0.0;
         double scaleY = 0.0;
-        
-        //Get the transformation matrix 
+
+        //Get the transformation matrix
         Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
         AffineTransform at = ctm.createAffineTransform();
        	scaleX = at.getScaleX();
         scaleY = at.getScaleY();
         return ScaledPoint(x, y, scaleX, scaleY);
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageDrawer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageWrapper.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageWrapper.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageWrapper.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageWrapper.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfviewer;
 
@@ -42,9 +42,9 @@
 
     /**
      * Constructor.
-     * 
+     *
      * @param aReader The reader application that holds this page.
-     * 
+     *
      * @throws IOException If there is an error creating the page drawing objects.
      */
     public PageWrapper( PDFReader aReader ) throws IOException
@@ -84,7 +84,7 @@
     {
         return pageWrapper;
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -101,4 +101,4 @@
         //reader.getBottomStatusPanel().getStatusLabel().setText( e.getX() + "," + (pagePanel.getHeight() - e.getY()) );
         reader.getBottomStatusPanel().getStatusLabel().setText( e.getX() + "," + e.getY() );
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/PageWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ReaderBottomPanel.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ReaderBottomPanel.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ReaderBottomPanel.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ReaderBottomPanel.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfviewer;
 
@@ -24,7 +24,7 @@
 import java.awt.FlowLayout;
 /**
  * A panel to display at the bottom of the window for status and other stuff.
- * 
+ *
  * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
  * @version $Revision: 1.2 $
  */
@@ -32,20 +32,20 @@
 {
 
     private JLabel statusLabel = null;
-    
+
     /**
      * This is the default constructor.
      */
-    public ReaderBottomPanel() 
+    public ReaderBottomPanel()
     {
         super();
         initialize();
     }
-    
+
     /**
      * This method initializes this.
      */
-    private void initialize() 
+    private void initialize()
     {
         FlowLayout flowLayout1 = new FlowLayout();
         this.setLayout(flowLayout1);
@@ -54,15 +54,15 @@
         flowLayout1.setAlignment(java.awt.FlowLayout.LEFT);
         this.add(getStatusLabel(), null);
     }
-    
+
     /**
      * This method initializes status label.
-     * 
-     * @return javax.swing.JLabel    
-     */    
-    public JLabel getStatusLabel() 
+     *
+     * @return javax.swing.JLabel
+     */
+    public JLabel getStatusLabel()
     {
-        if (statusLabel == null) 
+        if (statusLabel == null)
         {
             statusLabel = new JLabel();
             statusLabel.setText("Ready");

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfviewer/ReaderBottomPanel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSStandardOutputStream.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSStandardOutputStream.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSStandardOutputStream.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSStandardOutputStream.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfwriter;
 
@@ -154,4 +154,4 @@
         write(LF);
         // setOnNewLine(true);
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSStandardOutputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriter.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriter.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriter.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriter.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfwriter;
 
@@ -166,7 +166,7 @@
 
     // maps the object to the keys generated in the writer
     // these are used for indirect refrences in other objects
-    //A hashtable is used on purpose over a hashmap 
+    //A hashtable is used on purpose over a hashmap
     //so that null entries will not get added.
     private Map objectKeys = new Hashtable();
 
@@ -185,11 +185,11 @@
     //the actual for that object, so we will track
     //actuals separately.
     private Set actualsAdded = new HashSet();
-    
+
     private COSObjectKey currentObjectKey = null;
-   
+
     private PDDocument document = null;
-    
+
     private boolean willEncrypt = false;
 
     /**
@@ -353,22 +353,22 @@
         {
             addObjectToWrite( info );
         }
-        
+
 
         while( objectsToWrite.size() > 0 )
         {
             COSBase nextObject = (COSBase)objectsToWrite.remove( 0 );
             doWriteObject( nextObject );
         }
-        
-        
+
+
         willEncrypt = false;
-        
+
         if( encrypt != null )
         {
             addObjectToWrite( encrypt );
         }
-        
+
         while( objectsToWrite.size() > 0 )
         {
             COSBase nextObject = (COSBase)objectsToWrite.remove( 0 );
@@ -388,10 +388,10 @@
     {
         COSBase actual = object;
         if( actual instanceof COSObject )
-        {  
+        {
             actual = ((COSObject)actual).getObject();
         }
-        
+
         if( !writtenObjects.contains( object ) &&
             !objectsToWrite.contains( object ) &&
             !actualsAdded.contains( actual ) )
@@ -673,7 +673,7 @@
      */
     public Object visitFromBoolean(COSBoolean obj) throws COSVisitorException
     {
-        
+
         try
         {
             obj.writePDF( getStandardOutput() );
@@ -787,7 +787,7 @@
      */
     public Object visitFromFloat(COSFloat obj) throws COSVisitorException
     {
-        
+
         try
         {
             obj.writePDF( getStandardOutput() );
@@ -905,15 +905,15 @@
             if(willEncrypt)
             {
                 document.getSecurityHandler().decryptStream(
-                    obj, 
-                    currentObjectKey.getNumber(), 
+                    obj,
+                    currentObjectKey.getNumber(),
                     currentObjectKey.getGeneration());
             }
-            
+
             InputStream input = obj.getFilteredStream();
             // set the length of the stream and write stream dictionary
             COSObject lengthObject = new COSObject( null );
-            
+
             obj.setItem(COSName.LENGTH, lengthObject);
             //obj.accept(this);
             // write the stream content
@@ -952,15 +952,15 @@
     public Object visitFromString(COSString obj) throws COSVisitorException
     {
         try
-        {        
+        {
             if(willEncrypt)
-            {                    
+            {
                 document.getSecurityHandler().decryptString(
-                    obj, 
-                    currentObjectKey.getNumber(), 
-                    currentObjectKey.getGeneration());                    
+                    obj,
+                    currentObjectKey.getNumber(),
+                    currentObjectKey.getGeneration());
             }
-                        
+
             obj.writePDF( getStandardOutput() );
         }
         catch (Exception e)
@@ -993,12 +993,12 @@
     public void write(PDDocument doc) throws COSVisitorException
     {
         document = doc;
-        
+
         SecurityHandler securityHandler = document.getSecurityHandler();
         if(securityHandler != null)
         {
-            try 
-            {            
+            try
+            {
                 securityHandler.prepareDocumentForEncryption(document);
                 this.willEncrypt = true;
             }
@@ -1015,7 +1015,7 @@
         {
                 this.willEncrypt = false;
         }
-                
+
         COSDocument cosDoc = document.getDocument();
         COSDictionary trailer = cosDoc.getTrailer();
         COSArray idArray = (COSArray)trailer.getDictionaryObject( "ID" );
@@ -1023,7 +1023,7 @@
         {
             try
             {
-                
+
                 //algothim says to use time/path/size/values in doc to generate
                 //the id.  We don't have path or size, so do the best we can
                 MessageDigest md = MessageDigest.getInstance( "MD5" );
@@ -1038,7 +1038,7 @@
                     }
                 }
                 idArray = new COSArray();
-                COSString id = new COSString( md.digest() ); 
+                COSString id = new COSString( md.digest() );
                 idArray.add( id );
                 idArray.add( id );
                 trailer.setItem( "ID", idArray );
@@ -1048,7 +1048,7 @@
                 throw new COSVisitorException( e );
             }
         }
-        
+
         /*
         List objects = doc.getObjects();
         Iterator iter = objects.iterator();
@@ -1069,4 +1069,4 @@
         }*/
         cosDoc.accept(this);
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriterXRefEntry.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriterXRefEntry.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriterXRefEntry.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriterXRefEntry.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfwriter;
 
@@ -144,4 +144,4 @@
     {
         object = newObject;
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/COSWriterXRefEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/ContentStreamWriter.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/ContentStreamWriter.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/ContentStreamWriter.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/ContentStreamWriter.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdfwriter;
 
@@ -36,7 +36,7 @@
 
 /**
  * A class that will take a list of tokens and write out a stream with them.
- * 
+ *
  * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
  * @version $Revision: 1.8 $
  */
@@ -47,25 +47,25 @@
      * space character.
      */
     public static final byte[] SPACE = new byte[] { 32 };
-    
+
     /**
      * standard line separator on this platform.
      */
     public static final byte[] EOL = System.getProperty("line.separator").getBytes();
-    
+
     /**
      * This will create a new content stream writer.
-     * 
-     * @param out The stream to write the data to. 
+     *
+     * @param out The stream to write the data to.
      */
     public ContentStreamWriter( OutputStream out )
     {
         output = out;
     }
-    
+
     /**
      * This will write out the list of tokens to the stream.
-     *  
+     *
      * @param tokens The tokens to write to the stream.
      * @param start The start index into the list of tokens.
      * @param end The end index into the list of tokens.
@@ -82,7 +82,7 @@
         }
         output.flush();
     }
-    
+
     private void writeObject( Object o ) throws IOException
     {
         if( o instanceof COSString )
@@ -114,10 +114,10 @@
                 writeObject( array.get( i ) );
                 output.write( SPACE );
             }
-            
+
             output.write( COSWriter.ARRAY_CLOSE );
         }
-        else if( o instanceof COSDictionary ) 
+        else if( o instanceof COSDictionary )
         {
             COSDictionary obj = (COSDictionary)o;
             output.write( COSWriter.DICT_OPEN );
@@ -172,10 +172,10 @@
             throw new IOException( "Error:Unknown type in content stream:" + o );
         }
     }
-    
+
     /**
      * This will write out the list of tokens to the stream.
-     *  
+     *
      * @param tokens The tokens to write to the stream.
      * @throws IOException If there is an error writing to the stream.
      */

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdfwriter/ContentStreamWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDestinationNameTreeNode.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDestinationNameTreeNode.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDestinationNameTreeNode.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDestinationNameTreeNode.java Tue Aug  5 03:51:13 2008
@@ -1,18 +1,18 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package org.pdfbox.pdmodel;
 
@@ -39,17 +39,17 @@
     {
         super( PDPageDestination.class );
     }
-    
+
     /**
      * Constructor.
-     * 
+     *
      * @param dic The COS dictionary.
      */
     public PDDestinationNameTreeNode( COSDictionary dic )
     {
         super( dic, PDPageDestination.class );
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -65,7 +65,7 @@
         }
         return PDDestination.create( destination );
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -73,4 +73,4 @@
     {
         return new PDDestinationNameTreeNode(dic);
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDestinationNameTreeNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDocument.java?rev=682665&r1=682664&r2=682665&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDocument.java (original)
+++ incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDocument.java Tue Aug  5 03:51:13 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -66,13 +66,13 @@
 public class PDDocument implements Pageable
 {
     private COSDocument document;
-    
-    // NOTE BGUILLON: this property must be removed because it is 
-    // not the responsability of this class to know    
+
+    // NOTE BGUILLON: this property must be removed because it is
+    // not the responsability of this class to know
     //private boolean encryptOnSave = false;
-    
-    
-    // NOTE BGUILLON: these properties are not used anymore. See getCurrentAccessPermission() instead 
+
+
+    // NOTE BGUILLON: these properties are not used anymore. See getCurrentAccessPermission() instead
     //private String encryptUserPassword = null;
     //private String encryptOwnerPassword = null;
 
@@ -84,19 +84,19 @@
     //the COSDocument will not have an "Encrypt" dictionary anymore and this object
     //must be used.
     private PDEncryptionDictionary encParameters = null;
-    
+
     /**
      * This will tell if the document was decrypted with the master password.
      * NOTE BGUILLON: this property is not used anymore. See getCurrentAccessPermission() instead
      */
    //private boolean decryptedWithOwnerPassword = false;
-    
-    
+
+
     /**
      * The security handler used to decrypt / encrypt the document.
      */
     private SecurityHandler securityHandler = null;
-    
+
 
     /**
      * Constructor, creates a new PDF Document with no pages.  You need to add
@@ -141,12 +141,12 @@
         page.setParent( rootPages );
         rootPages.updateCount();
     }
-    
+
     /**
      * Remove the page from the document.
      *
      * @param page The page to remove from the document.
-     * 
+     *
      * @return true if the page was found false otherwise.
      */
     public boolean removePage( PDPage page )
@@ -161,10 +161,10 @@
         }
         return retval;
     }
-    
+
     /**
      * Remove the page from the document.
-     * 
+     *
      * @param pageNumber 0 based index to page number.
      * @return true if the page was found false otherwise.
      */
@@ -327,15 +327,15 @@
      * @throws IOException If there is an error determining which security handler to use.
      */
     public PDEncryptionDictionary getEncryptionDictionary() throws IOException
-    {    
-        if( encParameters == null ) 
+    {
+        if( encParameters == null )
         {
             if( isEncrypted() )
             {
                 encParameters = new PDEncryptionDictionary(document.getEncryptionDictionary());
             }
         }
-        return encParameters;               
+        return encParameters;
     }
 
     /**
@@ -360,7 +360,7 @@
      *
      * @throws IOException If there is an error determining if it is the user password.
      * @throws CryptographyException If there is an error in the encryption algorithms.
-     * 
+     *
      * @deprecated
      */
     public boolean isUserPassword( String password ) throws IOException, CryptographyException
@@ -411,7 +411,7 @@
      *
      * @throws IOException If there is an error determining if it is the user password.
      * @throws CryptographyException If there is an error in the encryption algorithms.
-     * 
+     *
      * @deprecated
      */
     public boolean isOwnerPassword( String password ) throws IOException, CryptographyException
@@ -454,21 +454,21 @@
 
     /**
      * This will decrypt a document. This method is provided for compatibility reasons only. User should use
-     * the new security layer instead and the openProtection method especially. 
+     * the new security layer instead and the openProtection method especially.
      *
      * @param password Either the user or owner password.
      *
      * @throws CryptographyException If there is an error decrypting the document.
      * @throws IOException If there is an error getting the stream data.
      * @throws InvalidPasswordException If the password is not a user or owner password.
-     * 
+     *
      */
     public void decrypt( String password ) throws CryptographyException, IOException, InvalidPasswordException
     {
-        try 
+        try
         {
             StandardDecryptionMaterial m = new StandardDecryptionMaterial(password);
-            this.openProtection(m);        
+            this.openProtection(m);
             document.dereferenceObjectStreams();
         }
         catch(BadSecurityHandlerException e)
@@ -476,18 +476,18 @@
             throw new CryptographyException(e);
         }
     }
-    
+
     /**
      * This will tell if the document was decrypted with the master password.  This
      * entry is invalid if the PDF was not decrypted.
-     * 
+     *
      * @return true if the pdf was decrypted with the master password.
-     * 
+     *
      * @deprecated use <code>getCurrentAccessPermission</code> instead
      */
     public boolean wasDecryptedWithOwnerPassword()
     {
-        return false;        
+        return false;
     }
 
     /**
@@ -501,69 +501,69 @@
      *
      * @throws CryptographyException If an error occurs during encryption.
      * @throws IOException If there is an error accessing the data.
-     * 
+     *
      */
     public void encrypt( String ownerPassword, String userPassword )
         throws CryptographyException, IOException
     {
         try
         {
-            StandardProtectionPolicy policy = 
+            StandardProtectionPolicy policy =
                 new StandardProtectionPolicy(ownerPassword, userPassword, new AccessPermission());
             this.protect(policy);
         }
         catch(BadSecurityHandlerException e)
         {
             throw new CryptographyException(e);
-        }                
+        }
     }
-    
-    
+
+
     /**
      * The owner password that was passed into the encrypt method. You should
      * never use this method.  This will not longer be valid once encryption
      * has occured.
-     * 
+     *
      * @return The owner password passed to the encrypt method.
-     * 
-     * @deprecated Do not rely on this method anymore. 
+     *
+     * @deprecated Do not rely on this method anymore.
      */
     public String getOwnerPasswordForEncryption()
     {
         return null;
     }
-    
+
     /**
      * The user password that was passed into the encrypt method.  You should
      * never use this method.  This will not longer be valid once encryption
      * has occured.
-     * 
+     *
      * @return The user password passed to the encrypt method.
-     * 
+     *
      * @deprecated Do not rely on this method anymore.
      */
     public String getUserPasswordForEncryption()
     {
-        return null;       
+        return null;
     }
-    
+
     /**
      * Internal method do determine if the document will be encrypted when it is saved.
-     * 
-     * @return True if encrypt has been called and the document 
+     *
+     * @return True if encrypt has been called and the document
      *              has not been saved yet.
-     *              
-     * @deprecated Do not rely on this method anymore. It is the responsibility of 
-     * COSWriter to hold this state       
+     *
+     * @deprecated Do not rely on this method anymore. It is the responsibility of
+     * COSWriter to hold this state
      */
     public boolean willEncryptWhenSaving()
     {
         return false;
     }
-    
+
     /**
      * This shoule only be called by the COSWriter after encryption has completed.
-     * 
+     *
      * @deprecated Do not rely on this method anymore. It is the responsability of
      * COSWriter to hold this state.
      */
@@ -571,7 +571,7 @@
     {
         //method is deprecated.
     }
-    
+
     /**
      * This will load a document from a url.
      *
@@ -585,7 +585,7 @@
     {
         return load( url.openStream() );
     }
-    
+
     /**
      * This will load a document from a url.
      *
@@ -614,7 +614,7 @@
     {
         return load( new FileInputStream( filename ) );
     }
-    
+
     /**
      * This will load a document from a file.
      *
@@ -643,7 +643,7 @@
     {
         return load( new FileInputStream( file ) );
     }
-    
+
     /**
      * This will load a document from a file.
      *
@@ -672,7 +672,7 @@
     {
         return load( input, null );
     }
-    
+
     /**
      * This will load a document from an input stream.
      *
@@ -744,7 +744,7 @@
     {
         return getNumberOfPages();
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -753,7 +753,7 @@
         PDDocumentCatalog cat = getDocumentCatalog();
         return (int)cat.getPages().getCount();
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -767,13 +767,13 @@
         //of the media box???
         double width=mediaBox.getWidth();
         double height=mediaBox.getHeight();
-        
-        
+
+
         int rotation = page.findRotation();
         if(rotation == 90)
         {
         	format.setOrientation( PageFormat.LANDSCAPE );
-	    }	
+	    }
 	    else if(rotation == 270)
 	    {
 	    	format.setOrientation( PageFormat.REVERSE_LANDSCAPE );
@@ -782,7 +782,7 @@
 	    {
 	    	format.setOrientation( PageFormat.PORTRAIT );
 	    }
-	       
+
       // If there is rotation > 0, we have to exchange the pagedimension for the printer
       if (rotation == 90 || rotation == 270) {
         	paper.setImageableArea( 0,0,height,width);
@@ -795,7 +795,7 @@
         format.setPaper( paper );
         return format;
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -803,22 +803,22 @@
     {
         return (Printable)getDocumentCatalog().getAllPages().get( pageIndex );
     }
-    
+
     /**
      * @see PDDocument#print()
-     * 
+     *
      * @param printJob The printer job.
-     * 
+     *
      * @throws PrinterException If there is an error while sending the PDF to
      * the printer, or you do not have permissions to print this document.
      */
     public void print(PrinterJob printJob) throws PrinterException
     {
         AccessPermission currentPermissions = this.getCurrentAccessPermission();
-        
+
         if(!currentPermissions.canPrint())
         {
-            throw new PrinterException( "You do not have permission to print this document." );    
+            throw new PrinterException( "You do not have permission to print this document." );
         }
         printJob.setPageable(this);
         if( printJob.printDialog() )
@@ -826,16 +826,16 @@
             printJob.print();
         }
     }
-    
+
     /**
      * This will send the PDF document to a printer.  The printing functionality
      * depends on the org.pdfbox.pdfviewer.PageDrawer functionality.  The PageDrawer
      * is a work in progress and some PDFs will print correctly and some will
-     * not.  This is a convenience method to create the java.awt.print.PrinterJob.  
-     * The PDDocument implements the java.awt.print.Pageable interface and 
+     * not.  This is a convenience method to create the java.awt.print.PrinterJob.
+     * The PDDocument implements the java.awt.print.Pageable interface and
      * PDPage implementes the java.awt.print.Printable interface, so advanced printing
-     * capabilities can be done by using those interfaces instead of this method. 
-     * 
+     * capabilities can be done by using those interfaces instead of this method.
+     *
      * @throws PrinterException If there is an error while sending the PDF to
      * the printer, or you do not have permissions to print this document.
      */
@@ -843,42 +843,42 @@
     {
         print( PrinterJob.getPrinterJob() );
     }
-    
+
     /**
      * This will send the PDF to the default printer without prompting the user
-     * for any printer settings. 
-     * 
+     * for any printer settings.
+     *
      * @see PDDocument#print()
-     * 
+     *
      * @throws PrinterException If there is an error while printing.
      */
     public void silentPrint() throws PrinterException
     {
         silentPrint( PrinterJob.getPrinterJob() );
     }
-    
+
     /**
      * This will send the PDF to the default printer without prompting the user
-     * for any printer settings. 
-     * 
+     * for any printer settings.
+     *
      * @param job A printer job definition.
      * @see PDDocument#print()
-     * 
+     *
      * @throws PrinterException If there is an error while printing.
      */
     public void silentPrint( PrinterJob job ) throws PrinterException
     {
         AccessPermission currentPermissions = this.getCurrentAccessPermission();
-        
+
         if(!currentPermissions.canPrint())
         {
-            throw new PrinterException( "You do not have permission to print this document." ); 
+            throw new PrinterException( "You do not have permission to print this document." );
         }
         PrinterJob printJob = PrinterJob.getPrinterJob();
         printJob.setPageable(this);
         printJob.print();
     }
-    
+
     /**
      * This will close the underlying COSDocument object.
      *
@@ -888,39 +888,39 @@
     {
         document.close();
     }
-    
-    
+
+
     /**
      * Protects the document with the protection policy pp. The document content will be really encrypted
      * when it will be saved. This method only marks the document for encryption.
-     * 
+     *
      * @see org.pdfbox.pdmodel.encryption.StandardProtectionPolicy
      * @see org.pdfbox.pdmodel.encryption.PublicKeyProtectionPolicy
-     * 
+     *
      * @param pp The protection policy.
-     * 
+     *
      * @throws BadSecurityHandlerException If there is an error during protection.
-     */    
+     */
     public void protect(ProtectionPolicy pp) throws BadSecurityHandlerException
     {
         SecurityHandler handler = SecurityHandlersManager.getInstance().getSecurityHandler(pp);
         securityHandler = handler;
     }
-    
+
     /**
      * Tries to decrypt the document in memory using the provided decryption material.
-     * 
+     *
      *  @see org.pdfbox.pdmodel.encryption.StandardDecryptionMaterial
      *  @see org.pdfbox.pdmodel.encryption.PublicKeyDecryptionMaterial
-     * 
+     *
      * @param pm The decryption material (password or certificate).
-     * 
+     *
      * @throws BadSecurityHandlerException If there is an error during decryption.
      * @throws IOException If there is an error reading cryptographic information.
      * @throws CryptographyException If there is an error during decryption.
-     */    
-    public void openProtection(DecryptionMaterial pm) 
-        throws BadSecurityHandlerException, IOException, CryptographyException 
+     */
+    public void openProtection(DecryptionMaterial pm)
+        throws BadSecurityHandlerException, IOException, CryptographyException
     {
         PDEncryptionDictionary dict = this.getEncryptionDictionary();
         if(dict.getFilter() != null)
@@ -931,23 +931,23 @@
             document.dereferenceObjectStreams();
             document.setEncryptionDictionary( null );
         }
-        else 
+        else
         {
             throw new RuntimeException("This document does not need to be decrypted");
         }
     }
-    
+
     /**
      * Returns the access permissions granted when the document was decrypted.
-     * If the document was not decrypted this method returns the access permission 
+     * If the document was not decrypted this method returns the access permission
      * for a document owner (ie can do everything).
      * The returned object is in read only mode so that permissions cannot be changed.
      * Methods providing access to content should rely on this object to verify if the current
      * user is allowed to proceed.
-     * 
+     *
      * @return the access permissions for the current user on the document.
      */
-    
+
     public AccessPermission getCurrentAccessPermission()
     {
         if(this.securityHandler == null)
@@ -956,14 +956,14 @@
         }
         return securityHandler.getCurrentAccessPermission();
     }
-    
+
     /**
      * Get the security handler that is used for document encryption.
-     * 
+     *
      * @return The handler used to encrypt/decrypt the document.
      */
     public SecurityHandler getSecurityHandler()
     {
         return securityHandler;
     }
-}
\ No newline at end of file
+}

Propchange: incubator/pdfbox/trunk/src/org/pdfbox/pdmodel/PDDocument.java
------------------------------------------------------------------------------
    svn:eol-style = native