Samy:
it seems like the itext jar can be outside of the class path (OR) that yorur 
agent should not use the implementation of that interface, why not try to 
create a class that is used by your agent (maybe like an attribute way) and 
call it.
I really can't imagine how the Notes agent will implement that kind of 
inerface, but use a class that does it.
usually the jars are on the C:\Archivos de 
programa\IBM\Lotus\Domino\jvm\lib\ext directory (on Win version)
Greetings
Carlos de Luna Saenz


----- Mensaje original ----
De: rams.samy <[EMAIL PROTECTED]>
Para: [email protected]
Enviado: sábado, 31 de mayo, 2008 2:02:45
Asunto: [iText-questions]  Lotus Notes Java Agent - using iText


Hi Bruno / Michael
I'm trying to create a Lotus Notes Java Agent to generate PDF file from
notes document field / values. I need to create radio button in a table cell
for user to select in the form. 

Understand from iText samples, for radio button inside a table cell, I need
to extend interface PdfPCellEvent and build a separate constructor to pass
it as a parameter in setCellEvent.

Lotus Domino Agent requires the following, 
import lotus.domino.*;

public class MyPDF extends AgentBase {

    public void NotesMain() {

        try {
            Session session = getSession();
            AgentContext agentContext = session.getAgentContext();

            // (Your code goes here) 

        } catch(Exception e) {
            e.printStackTrace();
        }
    }
}

after extending AgentBase if I implement the PdfPCellEvent Interface, i.e. 

public class MyPDF extends AgentBase implements PdfPCellEvent  {

............

}

The agent is compiled without any issues but while running I get the
following error

java.lang.InstantiationException: MyPDF
    at java.lang.Class.newInstance3(Class.java:346)
    at java.lang.Class.newInstance(Class.java:305)
    at lotus.domino.AgentInfo.newInstance(Unknown Source)
    at lotus.domino.AgentLauncher.run(Unknown Source)
    at lotus.domino.NotesThread.run(Unknown Source)

Looks like it's not able to find the PdfPCellEvent Interface class, I
already have the import as below:
import com.lowagie.text.pdf.PdfPCellEvent;

Is there anyway I can create a Radio Button without using PdfPCellEvent
class, i.e. directly use FieldPositioningEvents. Looks like
FieldpositioningEvents can be used only for text fields.
-- 
View this message in context: 
http://www.nabble.com/Lotus-Notes-Java-Agent---using-iText-tp17567728p17567728.html
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar



      
____________________________________________________________________________________
Yahoo! Deportes Beta
¡No te pierdas lo último sobre el torneo clausura 2008! Entérate aquí 
http://deportes.yahoo.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to