Thanks for your patience.
Please note that you only need Aspose.Words for .NET API to perform DOCX to PDF conversion and later, you can use Aspose.Pdf for .NET to manipulate resultant PDF as per your requirement. We have tested the scenario with following code snippet while using Aspose.Words for .NET 17.7 and were unable to notice any formatting issue in the resultant PDF.
For your reference, an output document has also been attached.
Aspose.Words.Document doc = new Words.Document(dataDir + "Test-Word.docx");
doc.Save(dataDir + "Test-Word.pdf", Words.SaveFormat.Pdf);
Test-Word.pdf (37.1 KB)
Furthermore, we have also tried to perform conversion through the code snippet which you have shared with us, while using Aspose.Pdf for .NET 17.7 and resultant PDF (Test-PDF2.pdf (37.2 KB)) was fine and there were no formatting issue in that.
Would you please try the scenario at your end, with latest versions of the APIs and in case if you still face any issue, please share some details regarding your working environment i.e OS Version, Application Type, Target Framework, etc. This would help us in testing the scenario accordingly and observe the issue in our environment, if there is any.