コード例 #1
0
 private byte[] CreatePdf(PDFRaportInputModel inputModel)
 {
     using (var memoryStream = new MemoryStream())
     {
         PdfWriter   writer   = new PdfWriter(memoryStream);
         PdfDocument pdfDoc   = new PdfDocument(writer);
         Document    document = new Document(pdfDoc);
         document.Add(_pdfService.AddTextToPdf());
         document.Add(_pdfService.AddTableToPdf(inputModel.ItemList));
         document.Close();
         return(memoryStream.ToArray());
     }
 }