Working Member Name and Address
Working Member Name and Address
{
// Retrieve the existing document
var document = await _documentsService.GetDocument(id);
if (document == null)
{
_logger.LogWarning("Document with ID {Id} not found", id);
return NotFound();
}
};
// Load the existing PDF and copy pages to the new PDF document
using (var memoryStream = new MemoryStream(pdfBytes))
{
PdfDocument existingPdfDocument = PdfReader.Open(memoryStream,
PdfDocumentOpenMode.Import);
foreach (PdfPage page in existingPdfDocument.Pages)
{
newPdfDocument.AddPage(page);
}
}