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