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 2010/06/21 19:20:29 UTC

svn commit: r956645 - in /pdfbox/trunk: app/ fontbox/src/main/java/org/apache/fontbox/encoding/ pdfbox/ pdfbox/src/main/java/org/apache/pdfbox/ pdfbox/src/main/java/org/apache/pdfbox/encoding/ pdfbox/src/main/java/org/apache/pdfbox/examples/util/ pdfbo...

Author: jukka
Date: Mon Jun 21 17:20:28 2010
New Revision: 956645

URL: http://svn.apache.org/viewvc?rev=956645&view=rev
Log:
PDFBOX-754: Move Resources to org.apache.pdfbox.resources

Added:
    pdfbox/trunk/pdfbox/src/main/resources/org/
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/
      - copied from r956541, pdfbox/trunk/pdfbox/src/main/resources/Resources/
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/pdfbox.properties   (with props)
Removed:
    pdfbox/trunk/pdfbox/src/main/resources/Resources/
Modified:
    pdfbox/trunk/app/pom.xml
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java
    pdfbox/trunk/pdfbox/build.xml
    pdfbox/trunk/pdfbox/pom.xml
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/Version.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfviewer/PageDrawer.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontManager.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDTrueTypeFont.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFImageWriter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java
    pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFBox_External_Fonts.properties

Modified: pdfbox/trunk/app/pom.xml
URL: http://svn.apache.org/viewvc/pdfbox/trunk/app/pom.xml?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/app/pom.xml (original)
+++ pdfbox/trunk/app/pom.xml Mon Jun 21 17:20:28 2010
@@ -52,7 +52,7 @@
           <instructions>
             <Export-Package>org.apache.pdfbox.*</Export-Package>
             <Embed-Transitive>true</Embed-Transitive>
-            <Embed-Dependency>*;scope=provided;inline=org/apache/**|Resources/**</Embed-Dependency>
+            <Embed-Dependency>*;scope=provided;inline=org/apache/**</Embed-Dependency>
             <Bundle-DocURL>${project.url}</Bundle-DocURL>
             <Main-Class>org.apache.pdfbox.PDFBox</Main-Class>
           </instructions>

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java Mon Jun 21 17:20:28 2010
@@ -43,11 +43,6 @@ public abstract class Encoding
     private static final Map<String,String> NAME_TO_CHARACTER = new HashMap<String,String>();
     private static final Map<String,String> CHARACTER_TO_NAME = new HashMap<String,String>();
 
-    static
-    {
-    }
-
-
     /**
      * This will add a character encoding.
      *

Modified: pdfbox/trunk/pdfbox/build.xml
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/build.xml?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/build.xml (original)
+++ pdfbox/trunk/pdfbox/build.xml Mon Jun 21 17:20:28 2010
@@ -151,7 +151,7 @@
     <target name="test" depends="testextract,test-junit,testimage" description="Run all the junit tests"/>
 
     <target name="find.adobefiles">
-        <available property="adobefiles.found" file="${dest.dir}/Resources/cmap"/>
+        <available property="adobefiles.found" file="${dest.dir}/org/apache/pdfbox/resources/cmap"/>
     </target>
 
     <target name="get.adobefiles"
@@ -173,8 +173,8 @@
             <param name="sourcefile" value="${adobefiles.glyph.url}"/>
             <param name="destfile" value="${adobefiles.glyph.txt}"/>
         </antcall>
-        <copy todir="${dest.dir}/Resources/" file="${adobefiles.glyph.txt}" overwrite="true"/> 
-        <unjar src="${adobefiles.jar}" dest="${dest.dir}/Resources/cmap">
+        <copy todir="${dest.dir}/org/apache/pdfbox/resources/" file="${adobefiles.glyph.txt}" overwrite="true"/> 
+        <unjar src="${adobefiles.jar}" dest="${dest.dir}/org/apache/pdfbox/resources/cmap">
             <patternset>
                 <include name="com/adobe/pdf/pcfi/chinese_t/*"/>
                 <include name="com/adobe/pdf/pcfi/japanese/*"/>
@@ -183,7 +183,7 @@
             </patternset>
             <mapper type="flatten"/>
         </unjar>
-        <unjar src="${adobefiles.additional.jar}" dest="${dest.dir}/Resources/cmap">
+        <unjar src="${adobefiles.additional.jar}" dest="${dest.dir}/org/apache/pdfbox/resources/cmap">
             <patternset>
                 <include name="ac15/CMap/*"/>
                 <include name="ag15/CMap/*"/>
@@ -197,10 +197,10 @@
             </patternset>
             <mapper type="flatten"/>
         </unjar>
-        <unjar src="${adobefiles.removed.jar}" dest="${dest.dir}/Resources/cmap">
+        <unjar src="${adobefiles.removed.jar}" dest="${dest.dir}/org/apache/pdfbox/resources/cmap">
             <mapper type="flatten"/>
         </unjar>
-        <unjar src="${adobefiles.jar}" dest="${dest.dir}/Resources/afm">
+        <unjar src="${adobefiles.jar}" dest="${dest.dir}/org/apache/pdfbox/resources/afm">
             <patternset>
                 <include name="com/adobe/pdf/pcfi/afm/*"/>
             </patternset>
@@ -385,9 +385,9 @@
         </antcall>
 	</target>
 
-  	<target name="package" depends="get.externallibs,compile" description="Package pdfbox into a jar file">
+    <target name="package" depends="get.externallibs,compile" description="Package pdfbox into a jar file">
         <property name="release.name" value="${project.name}-${project.version}" />
-        <propertyfile file="${resources.dir}/Resources/pdfbox.version">
+        <propertyfile file="${resources.dir}/org/apache/pdfbox/resources/pdfbox.version">
             <entry  key="pdfbox.version" value="${release.name}"/>
         </propertyfile>
 

Modified: pdfbox/trunk/pdfbox/pom.xml
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/pom.xml?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/pom.xml (original)
+++ pdfbox/trunk/pdfbox/pom.xml Mon Jun 21 17:20:28 2010
@@ -79,6 +79,12 @@
   </dependencies>
 
   <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
     <plugins>
       <plugin>
         <artifactId>maven-javadoc-plugin</artifactId>
@@ -137,8 +143,9 @@
           <instructions>
             <Bundle-DocURL>http://pdfbox.apache.org/</Bundle-DocURL>
             <Include-Resource>
+              {maven-resources},
               META-INF=target/maven-shared-archive-resources/META-INF,
-              Resources=target/classes/Resources
+              org/apache/pdfbox/resources=target/classes/org/apache/pdfbox/resources
             </Include-Resource>
           </instructions>
         </configuration>

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/Version.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/Version.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/Version.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/Version.java Mon Jun 21 17:20:28 2010
@@ -31,7 +31,8 @@ import org.apache.pdfbox.util.ResourceLo
  */
 public class Version
 {
-    private static final String PDFBOX_VERSION_PROPERTIES = "Resources/pdfbox.version";
+    private static final String PDFBOX_VERSION_PROPERTIES =
+        "org/apache/pdfbox/resources/pdfbox.properties";
 
     private Version()
     {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java Mon Jun 21 17:20:28 2010
@@ -65,9 +65,9 @@ public abstract class Encoding implement
     static
     {
         //Loads the official Adobe Glyph List
-        loadGlyphList("Resources/glyphlist.txt");
+        loadGlyphList("org/apache/pdfbox/resources/glyphlist.txt");
         //Loads some additional glyph mappings
-        loadGlyphList("Resources/additional_glyphlist.txt");
+        loadGlyphList("org/apache/pdfbox/resources/additional_glyphlist.txt");
 
         // Load an external glyph list file that user can give as JVM property
         String location = System.getProperty("glyphlist_ext");

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java Mon Jun 21 17:20:28 2010
@@ -53,7 +53,8 @@ public class PrintImageLocations extends
      */
     public PrintImageLocations() throws IOException
     {
-        super( ResourceLoader.loadProperties( "Resources/PDFTextStripper.properties", true ) );
+        super( ResourceLoader.loadProperties(
+                "org/apache/pdfbox/resources/PDFTextStripper.properties", true ) );
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfviewer/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfviewer/PageDrawer.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfviewer/PageDrawer.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfviewer/PageDrawer.java Mon Jun 21 17:20:28 2010
@@ -84,7 +84,8 @@ public class PageDrawer extends PDFStrea
      */
     public PageDrawer() throws IOException
     {
-        super( ResourceLoader.loadProperties( "Resources/PageDrawer.properties", true ) );
+        super( ResourceLoader.loadProperties(
+                "org/apache/pdfbox/resources/PageDrawer.properties", true ) );
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontManager.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontManager.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontManager.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontManager.java Mon Jun 21 17:20:28 2010
@@ -41,7 +41,9 @@ public class FontManager 
     static {
         try
         {
-            ResourceLoader.loadProperties( "Resources/FontMapping.properties", fontMapping );
+            ResourceLoader.loadProperties(
+                    "org/apache/pdfbox/resources/FontMapping.properties",
+                    fontMapping );
         }
         catch( IOException io )
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java Mon Jun 21 17:20:28 2010
@@ -77,47 +77,24 @@ public abstract class PDFont implements 
      * This is only used if this is a font object and it has an encoding.
      */
     private Encoding fontEncoding = null;
+
     /**
      * This is only used if this is a font object and it has an encoding and it is
      * a type0 font with a cmap.
      */
     private CMap cmap = null;
 
-    private static Map<String, String> afmResources = null;
-    private static Map<COSName, CMap> cmapObjects = null;
-    private static Map<String, FontMetric> afmObjects = null;
+    private static Map<COSName, CMap> cmapObjects =
+        Collections.synchronizedMap( new HashMap<COSName, CMap>() );
+
+    private static Map<String, FontMetric> afmObjects =
+        Collections.synchronizedMap( new HashMap<String, FontMetric>() );
 
     /**
      * This will be set if the font has a toUnicode stream.
      */
     private boolean hasToUnicode = false;
 
-    static
-    {
-        //these are read-only once they are created
-        afmResources = new HashMap<String, String>();
-
-        //these are read-write
-        cmapObjects = Collections.synchronizedMap( new HashMap<COSName, CMap>() );
-        afmObjects = Collections.synchronizedMap( new HashMap<String, FontMetric>() );
-
-
-        afmResources.put( "Courier-Bold" , "Resources/afm/Courier-Bold.afm" );
-        afmResources.put( "Courier-BoldOblique" , "Resources/afm/Courier-BoldOblique.afm" );
-        afmResources.put( "Courier" , "Resources/afm/Courier.afm" );
-        afmResources.put( "Courier-Oblique" , "Resources/afm/Courier-Oblique.afm" );
-        afmResources.put( "Helvetica" , "Resources/afm/Helvetica.afm" );
-        afmResources.put( "Helvetica-Bold" , "Resources/afm/Helvetica-Bold.afm" );
-        afmResources.put( "Helvetica-BoldOblique" , "Resources/afm/Helvetica-BoldOblique.afm" );
-        afmResources.put( "Helvetica-Oblique" , "Resources/afm/Helvetica-Oblique.afm" );
-        afmResources.put( "Symbol" , "Resources/afm/Symbol.afm" );
-        afmResources.put( "Times-Bold" , "Resources/afm/Times-Bold.afm" );
-        afmResources.put( "Times-BoldItalic" , "Resources/afm/Times-BoldItalic.afm" );
-        afmResources.put( "Times-Italic" , "Resources/afm/Times-Italic.afm" );
-        afmResources.put( "Times-Roman" , "Resources/afm/Times-Roman.afm" );
-        afmResources.put( "ZapfDingbats" , "Resources/afm/ZapfDingbats.afm" );
-    }
-
     /**
      * This will clear AFM resources that are stored statically.
      * This is usually not a problem unless you want to reclaim
@@ -302,7 +279,7 @@ public abstract class PDFont implements 
     protected FontMetric getAFM() throws IOException
     {
         if(afm==null){
-        	COSBase baseFont = font.getDictionaryObject( COSName.BASE_FONT );
+            COSBase baseFont = font.getDictionaryObject( COSName.BASE_FONT );
             String name = null;
             if( baseFont instanceof COSName )
             {
@@ -320,22 +297,14 @@ public abstract class PDFont implements 
             }
             if( name != null )
             {
-            	afm = afmObjects.get( name );
+                afm = afmObjects.get( name );
                 if( afm == null )
                 {
-                    String resource = afmResources.get( name );
-                    if( resource == null )
+                    String resource =
+                        "org/apache/pdfbox/resources/afm/" + name + ".afm";
+                    InputStream afmStream = ResourceLoader.loadResource( resource );
+                    if( afmStream != null )
                     {
-                        //ok for now
-                        //throw new IOException( "Unknown AFM font '" + name.getName() + "'" );
-                    }
-                    else
-                    {
-                        InputStream afmStream = ResourceLoader.loadResource( resource );
-                        if( afmStream == null )
-                        {
-                            throw new IOException( "Can't handle font width:" + resource );
-                        }
                         AFMParser parser = new AFMParser( afmStream );
                         parser.parse();
                         afm = parser.getResult();
@@ -429,8 +398,8 @@ public abstract class PDFont implements 
                             {
                                 cmapName = CMapSubstitution.substituteCMap( cmapName );
                             }
-                            
-                            String resourceRoot = "Resources/cmap/";
+
+                            String resourceRoot = "org/apache/pdfbox/resources/cmap/";
                             String resourceName = resourceRoot + cmapName;
                             parseCmap( resourceRoot, ResourceLoader.loadResource( resourceName ), encodingName );
                             if( cmap == null && !encodingName.getName().equals( COSName.IDENTITY_H.getName() ) )

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDTrueTypeFont.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDTrueTypeFont.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDTrueTypeFont.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDTrueTypeFont.java Mon Jun 21 17:20:28 2010
@@ -72,8 +72,8 @@ public class PDTrueTypeFont extends PDSi
     private static final Log log = LogFactory.getLog(PDTrueTypeFont.class);
 
     /**
-     * This is the key to a property in the Resources/PDFBox_External_Fonts.properties file
-     * to load a Font when a mapping does not exist for the current font.
+     * This is the key to a property in the PDFBox_External_Fonts.properties
+     * file to load a Font when a mapping does not exist for the current font.
      */
     public static final String UNKNOWN_FONT = "UNKNOWN_FONT";
 
@@ -86,12 +86,13 @@ public class PDTrueTypeFont extends PDSi
     {
         try
         {
-            ResourceLoader.loadProperties( "Resources/PDFBox_External_Fonts.properties", externalFonts );
+            ResourceLoader.loadProperties(
+                    "org/apache/pdfbox/resources/PDFBox_External_Fonts.properties",
+                    externalFonts );
         }
         catch( IOException io )
         {
-            io.printStackTrace();
-            throw new RuntimeException( "Error loading font resources" );
+            throw new RuntimeException( "Error loading font resources", io );
         }
     }
 
@@ -447,9 +448,7 @@ public class PDTrueTypeFont extends PDSi
      * Vertical7 Inc.
      *
      * @param fd The font descriptor currently used
-     *
      * @return A PDStream with the Font File program, null if fd is null
-     *grep -r
      * @throws IOException If the font is not found
      */
     private TrueTypeFont getExternalFontFile2(PDFontDescriptorDictionary fd)

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFImageWriter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFImageWriter.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFImageWriter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFImageWriter.java Mon Jun 21 17:20:28 2010
@@ -59,11 +59,9 @@ public class PDFImageWriter extends PDFS
 
     /**
      * Instantiate a new PDFImageWriter object.
-     * @throws IOException If there is an error loading the properties.
      */
-    public PDFImageWriter() throws IOException
+    public PDFImageWriter()
     {
-        super();// ResourceLoader.loadProperties( "Resources/PDFImageWriter.properties", true ) );
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFMarkedContentExtractor.java Mon Jun 21 17:20:28 2010
@@ -55,14 +55,17 @@ public class PDFMarkedContentExtractor e
     private TextNormalize normalize = null;
 
     /**
-     * Instantiate a new PDFTextStripper object.  This object will load properties from
-     * Resources/PDFTextStripper.properties and will not do anything special to 
-     * convert the text to a more encoding-specific output.  
+     * Instantiate a new PDFTextStripper object. This object will load
+     * properties from PDFMarkedContentExtractor.properties and will not
+     * do anything special to convert the text to a more encoding-specific
+     * output.
+     *
      * @throws IOException If there is an error loading the properties.
      */
     public PDFMarkedContentExtractor() throws IOException
     {
-        super( ResourceLoader.loadProperties( "Resources/PDFMarkedContentExtractor.properties", true ) );
+        super( ResourceLoader.loadProperties(
+                "org/apache/pdfbox/resources/PDFMarkedContentExtractor.properties", true ) );
         this.outputEncoding = null;
         this.normalize = new TextNormalize(this.outputEncoding);
     }
@@ -84,18 +87,19 @@ public class PDFMarkedContentExtractor e
         this.outputEncoding = null;
         this.normalize = new TextNormalize(this.outputEncoding);
     }
+
     /**
-     * Instantiate a new PDFTextStripper object. This object will load properties from
-     * Resources/PDFTextStripper.properties and will apply encoding-specific
-     * conversions to the output text.  
+     * Instantiate a new PDFTextStripper object. This object will load
+     * properties from PDFMarkedContentExtractor.properties and will apply
+     * encoding-specific conversions to the output text.
      *
      * @param encoding The encoding that the output will be written in.
-     *
      * @throws IOException If there is an error reading the properties.
      */
     public PDFMarkedContentExtractor( String encoding ) throws IOException
     {
-        super( ResourceLoader.loadProperties( "Resources/PDFMarkedContentExtractor.properties", true ));
+        super( ResourceLoader.loadProperties(
+                "org/apache/pdfbox/resources/PDFMarkedContentExtractor.properties", true ));
         this.outputEncoding = encoding;
         this.normalize = new TextNormalize(this.outputEncoding);
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java?rev=956645&r1=956644&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/PDFTextStripper.java Mon Jun 21 17:20:28 2010
@@ -120,14 +120,17 @@ public class PDFTextStripper extends PDF
     private TextNormalize normalize = null;
 
     /**
-     * Instantiate a new PDFTextStripper object.  This object will load properties from
-     * Resources/PDFTextStripper.properties and will not do anything special to 
-     * convert the text to a more encoding-specific output.  
+     * Instantiate a new PDFTextStripper object. This object will load
+     * properties from PDFTextStripper.properties and will not do
+     * anything special to convert the text to a more encoding-specific
+     * output.
+     *
      * @throws IOException If there is an error loading the properties.
      */
     public PDFTextStripper() throws IOException
     {
-        super( ResourceLoader.loadProperties( "Resources/PDFTextStripper.properties", true ) );
+        super( ResourceLoader.loadProperties(
+                "org/apache/pdfbox/resources/PDFTextStripper.properties", true ) );
         this.outputEncoding = null;
         normalize = new TextNormalize(this.outputEncoding);
     }
@@ -150,17 +153,17 @@ public class PDFTextStripper extends PDF
         normalize = new TextNormalize(this.outputEncoding);
     }
     /**
-     * Instantiate a new PDFTextStripper object. This object will load properties from
-     * Resources/PDFTextStripper.properties and will apply encoding-specific
-     * conversions to the output text.  
+     * Instantiate a new PDFTextStripper object. This object will load
+     * properties from PDFTextStripper.properties and will apply
+     * encoding-specific conversions to the output text.
      *
      * @param encoding The encoding that the output will be written in.
-     *
      * @throws IOException If there is an error reading the properties.
      */
     public PDFTextStripper( String encoding ) throws IOException
     {
-        super( ResourceLoader.loadProperties( "Resources/PDFTextStripper.properties", true ));
+        super( ResourceLoader.loadProperties(
+                "org/apache/pdfbox/resources/PDFTextStripper.properties", true ));
         this.outputEncoding = encoding;
         normalize = new TextNormalize(this.outputEncoding);
     }

Modified: pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFBox_External_Fonts.properties
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFBox_External_Fonts.properties?rev=956645&r1=956541&r2=956645&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFBox_External_Fonts.properties (original)
+++ pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/PDFBox_External_Fonts.properties Mon Jun 21 17:20:28 2010
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-Arial-BoldItalicMT=Resources/ttf/Arial-BoldItalicMT.ttf
-Arial-BoldMT=Resources/ttf/Arial-BoldMT.ttf
-ArialMT=Resources/ttf/ArialMT.ttf
-UNKNOWN_FONT=Resources/ttf/ArialMT.ttf
+Arial-BoldItalicMT=org/apache/pdfbox/resources/ttf/Arial-BoldItalicMT.ttf
+Arial-BoldMT=org/apache/pdfbox/resources/ttf/Arial-BoldMT.ttf
+ArialMT=org/apache/pdfbox/resources/ttf/ArialMT.ttf
+UNKNOWN_FONT=org/apache/pdfbox/resources/ttf/ArialMT.ttf

Added: pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/pdfbox.properties
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/pdfbox.properties?rev=956645&view=auto
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/pdfbox.properties (added)
+++ pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/pdfbox.properties Mon Jun 21 17:20:28 2010
@@ -0,0 +1 @@
+pdfbox.version=${project.version}

Propchange: pdfbox/trunk/pdfbox/src/main/resources/org/apache/pdfbox/resources/pdfbox.properties
------------------------------------------------------------------------------
    svn:eol-style = native