Hi. Converting a .docx file to PDF after updating fields deletes an image. Details are shown in the image below:
issue.png (36.9 KB)
The code for saving the file after updating is:
var doc = new Document(sourceDocument);
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
doc.UpdateFields();
doc.Save(m_pdfOutput.OutputPath);
The code for saving the file without updating is:
var doc = new Document(sourceDocument);
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
var saveOptions = new PdfSaveOptions();
saveOptions.UpdateFields = false;
doc.Save(m_pdfOutput.OutputPath, saveOptions);
We would like it so that the image is shown even after updating fields.
I have attached the .docx file, along with three outputs: word > save as PDF output; aspose > update fields output; and aspose > don’t update fields output.
test.zip (466.8 KB)
Thank you for your help.