Hi,

I am currently using the .net version of PDFBox.
I builded myself the .net libraries for the version 1.8.12 of PDFBox using ANT 
and IKVM as explained in the pdfbox.apache.org site.
It works well.

As the version 2.0 of PDFBox has been released, I would like to build the .net 
libraries for this new released version.
But it does not work properly.
First there is no build.xml file in the pdfbox directory.
So I copied the build.xml file from the version 1.8 to the version 2.0
But when I build the .net libraries using ant and ikvm, I get the following 
error messages :

pdfbox.compile:
    [javac] c:\pdfbox\pdfbox\build.xml:166: warning: 'includeantruntime' was 
not set, defaulting to build.sysclasspath=last; set to false for repeatable 
builds
    [javac] Compiling 550 source files to c:\pdfbox\pdfbox\target\classes
    [javac] warning: [options] bootstrap class path not set in conjunction with 
-source 1.6
    [javac] 
c:\pdfbox\pdfbox\src\main\java\org\apache\pdfbox\pdmodel\font\PDFont.java:269: 
warning: [deprecation] getHeight(int) in PDFontLike has been deprecated
    [javac]     public abstract float getHeight(int code) throws IOException;
    [javac]                           ^
    [javac] 
c:\pdfbox\pdfbox\src\main\java\org\apache\pdfbox\pdmodel\encryption\PublicKeySecurityHandler.java:170:
 error: incompatible types: X509CertificateHolder cannot be converted to 
Certificate
    [javac]                     if (rid.match(materialCert) && !foundRecipient)
    [javac]                                   ^
    [javac] 
c:\pdfbox\pdfbox\src\main\java\org\apache\pdfbox\pdmodel\encryption\PublicKeySecurityHandler.java:174:
 error: no suitable method found for getContent(JceKeyTransRecipient)
    [javac]                         envelopedData = ri.getContent(new 
JceKeyTransEnvelopedRecipient(privateKey).setProvider("BC"));
    [javac]                                           ^
    [javac]     method RecipientInformation.getContent(Key,String) is not 
applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     method RecipientInformation.getContent(Key,Provider) is not 
applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac] 
c:\pdfbox\pdfbox\src\main\java\org\apache\pdfbox\pdmodel\encryption\PublicKeySecurityHandler.java:430:
 error: incompatible types: DERObject cannot be converted to ASN1Primitive
    [javac]         ASN1Primitive object = input.readObject();
    [javac]                                                ^
    [javac] 
c:\pdfbox\pdfbox\src\main\java\org\apache\pdfbox\pdmodel\encryption\PublicKeySecurityHandler.java:448:
 error: cannot find symbol
    [javac]         return contentInfo.toASN1Primitive();
    [javac]                           ^
    [javac]   symbol:   method toASN1Primitive()
    [javac]   location: variable contentInfo of type ContentInfo
    [javac] 
c:\pdfbox\pdfbox\src\main\java\org\apache\pdfbox\pdmodel\encryption\PublicKeySecurityHandler.java:459:
 error: cannot find symbol
    [javac]         AlgorithmIdentifier algorithmId = 
certificate.getSubjectPublicKeyInfo().getAlgorithm();
    [javac]                                                                     
           ^
    [javac]   symbol:   method getAlgorithm()
    [javac]   location: class SubjectPublicKeyInfo
    [javac] 
c:\pdfbox\pdfbox\src\main\java\org\apache\pdfbox\pdmodel\encryption\PublicKeySecurityHandler.java:468:
 error: cannot find symbol
    [javac]             cipher = 
Cipher.getInstance(algorithmId.getAlgorithm().getId());
    [javac]                                                    ^
    [javac]   symbol:   method getAlgorithm()
    [javac]   location: variable algorithmId of type AlgorithmIdentifier
    [javac] 
c:\pdfbox\pdfbox\src\main\java\org\apache\pdfbox\pdmodel\font\PDCIDFont.java:287:
 warning: [deprecation] getHeight(int) in PDFontLike has been deprecated
    [javac]     public abstract float getHeight(int code) throws IOException;
    [javac]                           ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] Note: Some messages have been simplified; recompile with 
-Xdiags:verbose to get full output
    [javac] 6 errors
    [javac] 3 warnings

Did anyone try to build .net libraries for PDFBox 2.0 ? Is it still possible in 
version 2.0 ?
Any ideas about the errors ?

Thanks for your help,

Regards,



Gaëtane ROULEAU<mailto:[email protected]>
Chef de projet

Std : 09 69 321 921



[Société Arpège - www.arpege.fr]<http://www.arpege.fr>



Reply via email to