Hello together,
I’m using Aspose.Words with .NET to convert Word files (docx) to PDF. Word files are always from the same Word template. In the file there are some Merge Fields. After convertig a Word file to PDF sometimes content of merge field is missing.
Example: first screenshot Word, second PDF. See second red box with value “BKP; BZE; BZL”. This is one merge field in Word. In the converted PDF it’s just “BKP”.
Word:
PDF:
In the logs I can’t find any warnings or errors.
If I convert manually such a Word file (File => Export as) everything is fine.
I use Aspose.Words 18.10 (old licence).
I only have a few lines of code.
Setting the licence:
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense("Aspose.Total.lic");
Creating a Document object and saving it as PDF:
Document doc = new Document(sourcePath + sourceFilename + ".docx");
doc.Save(targetPath + targetFilename + ".pdf");
Do you have any idea why in some cases a part of the content of a merge field is missing?
Thank you and regards,
Daniel