Customizing Asp.net Core 5.0 Pdf -
var page = document.AddPage(); var gfx = XGraphics.FromPdfPage(page); var font = new XFont("Arial", 12); gfx.DrawString("Custom content", font, XBrushes.Black, new XRect(0, 0, page.Width, 40), XStringFormats.TopLeft); document.Save("output.pdf");
public void Compose(IDocumentContainer container) customizing asp.net core 5.0 pdf
var pdf = new CustomPdf("My Report", new List<string> "Item 1", "Item 2" ); var bytes = pdf.GeneratePdf(); return File(bytes, "application/pdf", "report.pdf"); var page = document