Create PDF documents from Lotus Notes with iText

iText is a library that allows you to generate PDF files on the fly.

The iText classes are very useful for people who need to generate read-only, platform independent documents containing text, lists, tables and images. The library is especially useful in combination with Java(TM) technology-based Servlets: The look and feel of HTML is browser dependent; with iText and PDF you can control exactly how your servlet’s output will look.

iText requires JDK 1.4. It’s available for free under a multiple license: MPL and LGPL.

[ via SearchDomino ]

3 thoughts on “Create PDF documents from Lotus Notes with iText

  1. Hi

    Require help.

    I have written a Java code in lotus notes using itext which will generate a PDF file. I want the full lotus notes document (text, richtext, images,etc) to be moved/exported/printed to PDF file using a porgram or code. Appreciate a response at the earliest… Thanks..

    appended is the code which have written

    import lotus.domino.*;
    import com.lowagie.text.PageSize;
    import com.lowagie.text.Paragraph;
    import com.lowagie.text.Chapter;
    import com.lowagie.text.Font;
    import com.lowagie.text.List;
    import com.lowagie.text.Table;
    import com.lowagie.text.Document;
    import com.lowagie.text.DocumentException;
    import com.lowagie.text.pdf.PdfWriter;
    import lotus.domino.RichTextItem;
    import com.lowagie.text.Image;

    public class JavaAgent extends AgentBase {
    public void NotesMain() {
    try {
    Session session = getSession();
    AgentContext agentContext = session.getAgentContext();
    //create document’s object

    Document document = new Document();

    try {
    //create a document
    PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(“c:\\PDFInlotus1.pdf”));
    document.addSubject(“Testing files.”);

    //open doc for r/w;

    DocumentCollection dc = agentContext.getUnprocessedDocuments();
    lotus.domino.Document doc = dc.getFirstDocument();

    // adding content to the document
    document.add(new Paragraph(doc.getItemValueString(“Text”)));
    //adding richtext field
    document.add(new Paragraph (doc.getItemValueString(“Additional_richText”)));
    // adding the full notes document – need help here

    // To insert image
    Image imgLogoImage = Image.getInstance(“c:/image.jpg”);

    doc = dc.getNextDocument(); }

    catch (DocumentException de) {


    } catch(Exception e) {


  2. Hi Santhosh,

    what you need isn’t help, you need a team of professional programmers. Exporting Notes-Documents to pdf with ITEXT is an extreme complex progress. You should look at the products from SWING Software and take a look at the prices.

  3. What a load of bollocs – it can be done without a large team and mega $$$ – admittedly it is a little complex but we’re a team of two and have it running within a Global Enterprise! All you need to do is read, research and play.

    Keep on trucking Santhosh, we’ll help you out when time permits.

Comments are closed.