title: creating a pdf file through java with a hyperlink
body: <p>I am trying to create a PDF file using Java. What I have seen is that I must have the iText library so I went and I got it. </p>
  
  <p>This is the piece of code I wrote but it's all full of errors... There is something going wrong here.</p>
  
  <pre><code>//com.lowagie.text.pdf.PdfWriter
  
  public class document  {
      Document document = new Document (PageSize.A4, 50, 50, 50, 50);
  
      PdfWriter writer = PdfWriter.getInstance(document, \
      new FileOutputStream("C:\ITextTest.pdf"));
      document.open(); 
  
      document.add(new Paragraph("First page of the document."));
      //document.add(new Paragraph("Some more text on the \ first page with different color and font type.", 
      //FontFactory.getFont(FontFactory.COURIER, 14, Font.BOLD, new Color(255, 150, 200))));
  
      document.close(); 
  }
  </code></pre>