iText Import problem

Hi All,I am trying to convert the incoming mail document to PDF. I search though forum and google i found that there is a iText which gives functionality to achive this task.

Now my problme is

import lotus.domino.*;

import java.io.FileOutputStream;

import java.io.IOException;

import com.lowagie.text.Anchor; /// Here i got an error “Class com.lowagie.text.Anchor not found in import” while compiling the code.

import org.xml.saxorg.xml.sax;

import com.lowagie.text.Document;

import com.lowagie.text.DocumentException;

import com.lowagie.text.Paragraph;

import com.lowagie.text.pdf.PdfWriter;

public class JavaAgent extends AgentBase {

public void NotesMain() {

try {

Session session = getSession();

AgentContext agentContext = session.getAgentContext();

// (Your code goes here)

// step 1: creation of a document-object

Document document = new Document();

try {

// step 2:

// we create a pdf writer that listen to the document

PdfWriter pdf = PdfWriter.getInstance(document,

new FileOutputStream(“C:\Temp\HelloWorldPdf.pdf”));

// step 3: we open the document

document.open();

// step 4: we add a paragraph to the document

document.add(new Paragraph(“This is a paragraph”));

} catch (DocumentException de) {

System.err.println(de.getMessage());

} catch (IOException ioe) {

System.err.println(ioe.getMessage());

}

// step 5: we close the document

document.close();

} catch(Exception e) {

e.printStackTrace();

}

}

}

Could you help me how to configure and where should i put the jar file and how to do this.

I have server 6.5.1 and iText.jar is 1.4.

Please help me if some body have solutions.

With Regards,

Vikas K Sinha

Subject: iText Import problem

Hi!

I have put the jar file inside the folder

C:\Lotus\notes\jvm\lib\ext\

but now after compileing when i try to run i got following error:

java.lang.NoClassDefFoundError: com/lowagie/text/DocumentException

at java.lang.Class.newInstance0(Native Method)

at java.lang.Class.newInstance(Class.java:262)

at lotus.domino.AgentInfo.newInstance(Unknown Source)

at lotus.domino.AgentLauncher.run(Unknown Source)

at lotus.domino.NotesThread.run(NotesThread.java:206)

What i am doing wrong friend…

Please help me i m new to Java…

Please help me its urgent for me…

I will be very thankful to you for your kind response…

With Regards,

Vikas K Sinha

Subject: iText Import problem

Pls help…

Subject: iText Import problem

This may seem too simple, so I might have misunderstood your problem.

When you are in the Designer for the agent, when you have selected Java as your language there is an Edit Project button bottom left.

You can user the browse functions to navigate to the place you have stored the jar file, then you can add the jar file to your project.

I too have started to use iText in Domino. I want to merge document fields into text like a mail merge facility. This would turn Notes into a powerful tool. If you make a useful app - put in up on openntf.org.