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

Reply via email to