lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Janssen <jans...@parc.com>
Subject wrapping itext with JCC?
Date Wed, 29 Sep 2010 19:27:26 GMT
I thought I'd try writing my own version of pdftk with Python.  (pdftk
is a C++ wrapper around a Java library that uses gcj to provide the C++
bindings.)  First I have to wrap iText with JCC.  I'm using JCC 2.6 from
PyLucene 2.9.1.

% python -m jcc --shared --jar iText.jar --package java.lang --package java.util --package
java.io --python itext --version 5.0.4 --files 2 --build
[...]
build/_itext/com/itextpdf/text/pdf/PdfName.h:207: error: expected unqualified-id before numeric
constant
build/_itext/com/itextpdf/text/pdf/PdfName.h:207: error: abstract declarator ‘com::itextpdf::text::pdf::PdfName*’
used as declaration
build/_itext/com/itextpdf/text/pdf/PdfName.h:207: error: expected ‘;’ before numeric constant
build/_itext/com/itextpdf/text/pdf/PdfName.h:207: error: expected unqualified-id before numeric
constant
build/_itext/com/itextpdf/text/pdf/PdfName.h:207: error: abstract declarator ‘com::itextpdf::text::pdf::PdfName*’
used as declaration
build/_itext/com/itextpdf/text/pdf/PdfName.h:207: error: expected ‘;’ before numeric constant
lipo: can't open input file: /var/folders/h0/h0Bg3-SkGAmoqGhgtZCaok++0T2/-Tmp-//ccyFkD7H.out
(No such file or directory)
error: command 'gcc' failed with exit status 1
%

Seems like the offending line is

                    static PdfName *DOMAIN;

which comes from this in the Java source:

  public class PdfName extends PdfObject implements Comparable<PdfName> {

       ...

      public static final PdfName DOMAIN = new PdfName("Domain");

  }

Assuming DOMAIN is the problem, what's the right way to rename it out of the way?

I tried adding "--rename com.itextpdf.text.pdf.PdfName.DOMAIN=DOMAIN_",
with no change.

Bill

Mime
View raw message