Take the 2-minute tour ×

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);

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.

share|improve this question
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer


