I am trying to find out how i can use my Tables.css on the pdf output that my code makes.
Here is my code:
public FileResult Edit(SpiseKopunTable model)
    {
        bool b = repository.PutSpiseKopun(model);
        DateTime d = new DateTime(1980, 1, 1);
        DateTime.TryParse(model.Dato.ToString(), out d);
        int c = new int();
        int.TryParse(model.ID.ToString(), out c);
        int e = new int();
        int.TryParse(model.Antal_Kuponer.ToString(), out e);
        using (MemoryStream stream = new System.IO.MemoryStream())
        {   
            int Antal_Kuponer = e;
            string SpiseTable = String.Format("<table><tbody><tr><td>GL:{0}</td></ tr >< tr >< td > Service:{1}</ td ></ tr >< tr >< td > Dato:{2}</ td ></ tr >< tr >< td > Pris:{3}</ td ></ tr >< tr >< td > Kommentar:{4}</ td ></ tr><tr><td> ID:{5}</ td ></ tr ></ tbody ></ table >",
                            model.GL,
                            model.Service,
                            d.ToString("dd-MM-yyyy"),
                            model.Pris,
                            model.Kommentar,
                            c.ToString()
                            );
            StringReader sr = new StringReader(
                 new StringBuilder().Insert(0, SpiseTable, e).ToString()
            );
            Document pdfDoc = new Document(PageSize.A4, 40, 40, 20, 20);
            PdfWriter writer = PdfWriter.GetInstance(pdfDoc, stream);
            //Console.WriteLine(sr);
            pdfDoc.Open();
            XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, sr);
            pdfDoc.Close();
            return File(stream.ToArray(), "application/pdf", "Airgreenland-vouchers.pdf");
        }
    }
I have looked at the official examples from iTextSharp tables styling, but i can't make it work on my code.
Regards Erneeraq Fleischer
