pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fischer...@aon.at>
Subject Re: Can't Compile: cannot find symbol method getSpaceMapping()
Date Fri, 18 Jan 2013 09:58:05 GMT
Hello,

still stuck.

First:

>> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ fontbox
---
>> [INFO] Compiling 4 source files to /SVN/PDFbox/trunk/fontbox/target/test-classes
>> [INFO] -------------------------------------------------------------
>> [ERROR] COMPILATION ERROR :
>> [INFO] -------------------------------------------------------------
>> [ERROR] /SVN/PDFbox/trunk/fontbox/src/test/java/org/apache/fontbox/cff/Type1CharStringTest.java:[46,16]
parse(byte[]) in org.apache.fontbox.cff.Type1CharStringParser cannot be applied to (byte[],org.apache.fontbox.cff.IndexData)
>> [ERROR] /SVN/PDFbox/trunk/fontbox/src/test/java/org/apache/fontbox/cff/Type1CharStringTest.java:[65,16]
parse(byte[]) in org.apache.fontbox.cff.Type1CharStringParser cannot be applied to (byte[],org.apache.fontbox.cff.IndexData)
> Please double check the source of Type1CharStringTest.

What do you mean?
I use
/SVN/PDFbox/trunk/fontbox/src/test/java/org/apache/fontbox/cff/Type1CharStringTest.java (identical
to the svn's version).
In Type1CharStringTest.java I have in line 44 to 46

        byte[] encodedCommands = new Type1CharStringFormatter().format(commands);
        List<Object> decodedCommands = new Type1CharStringParser()
                .parse(encodedCommands, new IndexData(0));

and in lines 63 t0 65

        byte[] encodedNumbers = new Type1CharStringFormatter().format(numbers);
        List<Object> decodedNumbers = new Type1CharStringParser()
                .parse(encodedNumbers, new IndexData(0));

which obviously is what the compiler is complaining about.
I dont understand enough of the whole system why this "cannot be applied to (byte[],org.apache.fontbox.cff.IndexData)".
Should it be?

> Your environment looks good, Probably your local maven repository is somehow mixed up.
Remove the pdfbox/fontbox stuff and restart mvn clean install.

I erased the .m2 folder in my home directory, but that didn't change anything (only took more
time to fetch the stuff again).

Just to check I erased the file Type1CharStringTest.java and then fontbox compiled and everything
went through until I hit the old error again:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project pdfbox: Compilation failure
[ERROR] /SVN/PDFbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDSimpleFont.java:[525,52]
cannot find symbol
[ERROR] symbol  : method getSpaceMapping()
[ERROR] location: class org.apache.fontbox.cmap.CMap

which refers to
                    int spaceMapping = toUnicodeCmap.getSpaceMapping();
in PDSimpleFont.java

Why getSpaceMapping() is not found in public class CMap I don't understand. There is

    /** 
     * Returns the mapping for the space character.
     * 
     * @return the mapped code for the space character
     */
    public int getSpaceMapping()
    {
        return spaceMapping;
    }

inside.
But what is it supposed to do and why isn't it found?

I could run the compilation with the -X switch again if it would help in any way.

Best
Thomas


Mime
View raw message