We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problems converting Word Files to PDF

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”.


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();

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_Richter Could you please attach your input and output documents here for testing? We will check the issue and provide you more information. Unfortunately, it is not possible to analyze the problem using screenshots.

Hi Alexey,

the input Word file and PDF output file:
BZ0000206_Short.docx (76.0 KB)
BZ0000206_Short.pdf (64.7 KB)


@Daniel_Richter Thank you for additional information. I cannot reproduce the problem on my side using the latest 23.2 version of Aspose.Words. Here is output document produced on my side: out.pdf (65.6 KB)

It looks like there is some problem with wrapping text in structured document tags in old version of Aspose.Words. I would suggest you to update to the more recent version of Aspose.Words.