// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.*;

import com.lowagie.text.*;
import com.lowagie.text.pdf.*;

public class Chap0101 {
    public static void main(String[] args) {
        System.out.println("Chapter 1 example 1: Hello World");
        Document document = new Document();
        try {
            PdfWriter.getInstance(document, new FileOutputStream("C:\\Chap0101.pdf"));
            document.open();
            document.add(new Paragraph("Hello World"));
        } catch (DocumentException de) {
            System.err.println(de.getMessage());
        } catch (IOException ioe) {
            System.err.println(ioe.getMessage());
        }
        document.close();
    }
}
