";
69 | htmlcontent += "

";
70 | htmlcontent += "
" + copies[i] + "
";
71 | htmlcontent += "
Welcome to Nihira Techiees
";
72 |
73 |
74 |
75 | if (header != null)
76 | {
77 | htmlcontent += "
Invoice No:" + header.InvoiceNo + " & Invoice Date:" + header.InvoiceDate + "
";
78 | htmlcontent += "
Customer : " + header.CustomerName + "
";
79 | htmlcontent += "
" + header.DeliveryAddress + "
";
80 | htmlcontent += "
Contact : 9898989898 & Email :ts@in.com
";
81 | htmlcontent += "
";
82 | }
83 |
84 |
85 |
86 | htmlcontent += "
";
87 | htmlcontent += "";
88 | htmlcontent += "";
89 | htmlcontent += "| Product Code | ";
90 | htmlcontent += " Description | ";
91 | htmlcontent += "Qty | ";
92 | htmlcontent += "Price | ";
93 | htmlcontent += "Total | ";
94 | htmlcontent += "
";
95 | htmlcontent += "";
96 |
97 | htmlcontent += "";
98 | if (detail != null && detail.Count > 0)
99 | {
100 | detail.ForEach(item =>
101 | {
102 | htmlcontent += "";
103 | htmlcontent += "| " + item.ProductCode + " | ";
104 | htmlcontent += "" + item.ProductName + " | ";
105 | htmlcontent += "" + item.Qty + " | ";
106 | htmlcontent += "" + item.SalesPrice + " | ";
107 | htmlcontent += " " + item.Total + " | ";
108 | htmlcontent += "
";
109 | });
110 | }
111 | htmlcontent += "";
112 |
113 | htmlcontent += "
";
114 | htmlcontent += "
";
115 |
116 | htmlcontent += "
";
117 | htmlcontent += "
Summary Info
";
118 | htmlcontent += "
";
119 | htmlcontent += "";
120 | htmlcontent += "| Summary Total | ";
121 | htmlcontent += " Summary Tax | ";
122 | htmlcontent += " Summary NetTotal | ";
123 | htmlcontent += "
";
124 | if (header != null)
125 | {
126 | htmlcontent += "";
127 | htmlcontent += "| " + header.Total + " | ";
128 | htmlcontent += "" + header.Tax + " | ";
129 | htmlcontent += " " + header.NetTotal + " | ";
130 | htmlcontent += "
";
131 | }
132 | htmlcontent += "
";
133 | htmlcontent += "
";
134 |
135 | htmlcontent += "
";
136 |
137 | PdfGenerator.AddPdfPages(document, htmlcontent, PageSize.A4);
138 | }
139 | byte[]? response = null;
140 | using(MemoryStream ms = new MemoryStream())
141 | {
142 | document.Save(ms);
143 | response = ms.ToArray();
144 | }
145 | string Filename = "Invoice_" + InvoiceNo + ".pdf";
146 | return File(response, "application/pdf", Filename);
147 | }
148 |
149 |
150 | [HttpGet("generateaddresspdf")]
151 | public async Task