Я хочу добавить html данные над моим нижним колонтитулом, так как в pdf может быть много страниц с нижним колонтитулом. Но мне нужны html данные только на последней странице . Поскольку я использую pdfcrowd API для создания PDF.
FileStream fileStream;// For Creating a file
fileStream = new FileStream(Server.MapPath("/Documents/Invoices/" + results.SalesInvoiceNumber.ToString() + "/" + results.SalesInvoiceNumber.ToString() + ".pdf"), FileMode.CreateNew);
// for Header work
string htmlViewRender = CommonFunction.RenderRazorViewToString(this, "~/Views/Invoice/InvoicePdfBody.cshtml", results);
// for footer work
string htmlFooterViewRender = CommonFunction.RenderRazorViewToString(this, "~/Views/Invoice/InvoicePdfFooter.cshtml", results);
// create output file for conversion result
// run the conversion and store the result into a pdf variable
// client.setFooterHtml(htmlFooterViewRender);
client.setPageMargins(".2in", "0in", "2.59in", "0in");
client.setFooterHtml(htmlFooterViewRender);//set the html footer in pdf
client.convertHtml(htmlViewRender, fileStream);//Set the html header in pdf
Поскольку этот код я использую для создания PDF с использованием pdfcrowd API