namespace iText.Samples.Sandbox.Tables
{
public class SimpleTable
{
public static readonly string DEST = "results/sandbox/tables/simple_table.pdf";
public static void Main(String[] args)
{
FileInfo file = new FileInfo(DEST);
file.Directory.Create();
new SimpleTable().ManipulatePdf(DEST);
}
private void ManipulatePdf(String dest)
{
PdfDocument pdfDoc = new PdfDocument(new PdfWriter(dest));
Document doc = new Document(pdfDoc);
Table table = new Table(UnitValue.CreatePercentArray(8)).UseAllAvailableWidth();
for (int i = 0; i < 16; i++)
{
table.AddCell("hi");
}
doc.Add(table);
doc.Close();
}
}
}
It my seem easy for most, but I have tried and tried and am just stumped. It is not just a console app, and it is not just a class. I am missing something simple I am sure but I am not trying to do a command line app either where I pass arguments to this app. Please help.
Tried all I could.
I have done plenty of forms apps and a few console apps, but I know I am missing something very simple.
I have looked and don't see my answer.