2

Currently I am working Generating Pdf file. My problem is that I want to print my addressTable into absolute position

PdfWriter writer = PdfWriter.GetInstance(doc,stream)
PdfContentByte cb = writer.getDirectContent();
ColumnText ct = new ColumnText(cb);
Phrase myText = new Phrase("TEST paragraph\nNewline");
ct.SetSimpleColumn(myText, 34, 750, 580, 317, 15, Element.ALIGN_LEFT);
ct.Go();

This is my code but getDirectContent() give me error. So please any body help me that how to print my address table into fixed position.

Bruno Lowagie
  • 75,994
  • 9
  • 109
  • 165
Azhar
  • 31
  • 2
  • 3

1 Answers1

2

That's easy. Go to the C# port of the examples of my book. Take a look at the code samples in Chapter 3. You'll find examples with lines such as:

PdfContentByte over = writer.DirectContent;

This is one of the minor differences between the Java version and the C# version.

Bruno Lowagie
  • 75,994
  • 9
  • 109
  • 165