Hi,
I have a document in word (.docx), which then I transform it into .pdf, either within the word or the pdf I need to change an image (the image is always the same),
I have looked for examples without reaching any solution
this is my c# net core code
var templatePath = "mypath\file.docx";
var docStream = new FileStream(templatePath, FileMode.Open, FileAccess.Read);
var wordDocument = new WordDocument(docStream, FormatType.Automatic);
//code replacing some values insde .docx
var docIORenderer = new DocIORenderer();
PdfDocument pdfDocument = docIORenderer.ConvertToPDF(wordDocument);
docIORenderer.Dispose();
wordDocument.Dispose();
var memoryStream = new MemoryStream();
pdfDocument.Save(memoryStream);
memoryStream.Position = 0;
pdfDocument.Close(true);
string fileName = "Output.pdf";
var file = File(memoryStream, "application/pdf", fileName);
Could you help me solve the problem described based on this code?