Format shifts when Word file is processed to PDF

We are using Aspose.Word.dll 17.2 to remove metadata from Word document and Aspose.PDF.dll 17.8 to turn that Word document into a PDF. I have a client with a document where the table on page 2 under paragraph 2.4 shifts and wraps the text oddly (does not retain original format) when the document is converted to PDF. The metadata removal process of the Word document does NOT alter the format so the problem lies with the PDF conversion step.

I’ve attached the sample Word document and the result we are getting in the PDF.

Thanks,
Kristen Theologus
Product Support Specialist for BigHand DocID

Sample format shifting.zip (77.9 KB)

@KTechnogal

Thanks for contacting support.

Please note that it is always recommended to use latest versions of the APIs as they have more fixes and improvements. Please try your scenario using latest versions i.e. (Aspose.PDF for .NET 18.5 and Aspose.Words for .NET 18.5 and in case you still face any issue, please share your complete sample code snippet. We will test the scenario in our environment and address it accordingly.

You may convert Word document into PDF using Aspose.Words API, which serves the purpose. As requested above, please share complete sample code snippet, so that we can look into the scenario and address it accordingly.

We have tested with Aspose.pdf and Aspose.Words version 18.5 and the issue remains.

The table on page 2 under paragraph 2.4 shifts and wraps the text oddly. Sample from the version 18.5

The metadata removal process of the Word document does NOT alter the format so the problem lies with the PDF conversion step.

Sample format shifting-version 18.5 test.zip (82.0 KB)

@KTechnogal

Thanks for getting back to us.

Would you please share the sample code snippet for whole scenario. We will test the scenario accordingly in our environment and share our feedback.

 public void ClearAuthorAndTitleFromPdf(string path)
    {
        var pdf = new Aspose.Pdf.Document();
        var pdfInfo = new Aspose.Pdf.DocumentInfo(pdf);
        pdfInfo.Author = string.Empty;
        pdfInfo.Title = string.Empty;
        pdf.Save();
    }

@KTechnogal

This code snippet is for clearing metadata info, would you please also share the code snippet which you are using for conversion process. We believe that you are using Aspose.Words API to convert word document into PDF.

Saving PDF code.zip (1.9 KB)

@KTechnogal,

Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. As shown in this screenshot, when converting “Sample format shifting.docx” to PDF, Aspose.Words incorrectly floats Paragraph towards left page margin on second page of PDF. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-16959. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-16959) have been fixed in this Aspose.Words for .NET 18.9 update and this Aspose.Words for Java 18.9 update.