Mark, thank you for your reply.

My first post had a litle error, the error message was: java.lang.NoSuchFieldError: HALFTONE, and not HHALFTONE as showed.

I´m not using JNI, the error is produced in "super(HALFTONE) " line, and it is the same if a write "super(PdfDictionary.HALFTONE)".

I´m thinking in a compilation problem. May be I´m not compiling the library correctly, however, the new PdfHalftone Class is embedded into the jar file correctly.

what do you think?




------------------------------

Message: 3
Date: Mon, 23 Apr 2007 14:54:21 -0700
From: "Mark Storer" <[EMAIL PROTECTED]>
Subject: Re: [iText-questions] New Dictionary
To: "Post all your questions about iText here"
	<itext-questions@lists.sourceforge.net>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain;	charset="iso-8859-1"

  
Exception in thread "AWT-EventQueue-0" 
java.lang.NoSuchFieldError: HHALFTONE
    at com.lowagie.text.pdf.PdfHalftone.<init>(Unknown Source)

    

That looks remarkably like a syntax error (reffering to double-h-HHALFTONE), but this being a run time exception, that shouldn't happen.  Are you calling functions by string name, or through JNI or something?

--Mark Storer 
  Senior Software Engineer 
  Cardiff.com

#include <disclaimer> 
typedef std::Disclaimer<Cardiff> DisCard; 



  
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Alberto Malvido
Sent: Friday, April 20, 2007 1:07 AM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] New Dictionary


Hi,

I'm creating pdf documents with only one image on it. I want to add 
halftone parameters to the pdf, so the image be printed with the 
halftone screen I want.
To do this, I created a PDFHalftone class:

public class PdfHalftone extends PdfDictionary {
   
    public PdfHalftone() {
        super(HALFTONE);
        put(PdfName.HALFTONETYPE, new PdfNumber((int)1));
        put(PdfName.FREQUENCY,  new PdfNumber((int)200));
        put(PdfName.ANGLE,  new PdfNumber((int)0));
        put(PdfName.SPOTFUNCTION, PdfName.SIMPLEDOT);
    }
}

Furthermore, I added this line to the PDFDictionary class file:

    /** This is a possible type of dictionary */
    public static final PdfName HALFTONE = PdfName.HALFTONE;

and these ones to the PDFName class:

public static final PdfName HALFTONE = new PdfName("Halftone");
public static final PdfName HALFTONETYPE = new 
PdfName("HalftoneType");
public static final PdfName SIMPLEDOT = new PdfName("SimpleDot");
public static final PdfName ANGLE = new PdfName("Angle");
public static final PdfName FREQUENCY = new PdfName("Frequency");

When I call to the PDFHalftone from my Java program:  new 
com.lowagie.text.pdf.PdfHalftone();
I got the next error message:


Any idea?.
begin:vcard
fn;quoted-printable:Alberto Malvido Garc=C3=ADa
n;quoted-printable:Malvido Garc=C3=ADa;Alberto
org;quoted-printable:Universidad de Vigo;Teor=C3=ADa de la Se=C3=B1al y Comunicaciones
adr;dom:;;E.T.S.I. de Telecomunicacion. As Lagoas Marcosende.;Vigo;Pontevedra;36200
email;internet:[EMAIL PROTECTED]
tel;work:+34 986812672
tel;home:652844623
url:http://www.uvigo.es
version:2.1
end:vcard

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to