Document format changes after saving as PDF

sample.zip (61.2 KB)

If we open the attached document using Aspose.Words and then immediately resave the document as a PDF, the format of the document changes. There is a table on the document’s first page in the upper right hand corner. The original formatting of the document makes it so the text lines up properly - the “By:”, “Name:” and “Title:” lines are all left justified and line up, and the line after “By:” appears properly. After running it through simple code that looks like this:

    Dim Document = New Aspose.Words.Document(SourcePath)
    Dim SaveOptions As Aspose.Words.Saving.PdfSaveOptions = DirectCast(Aspose.Words.Saving.SaveOptions.CreateSaveOptions(Aspose.Words.SaveFormat.Pdf), Aspose.Words.Saving.PdfSaveOptions)
    Document.Save(DestPath, SaveOptions)

the resulting PDF document has the line moved down one line, with the “Name” label at its end and the “By:” label on its own line, yet the colon from the “Name” label stayed on the original line.

Is there a way to preserve the original formatting during the save as PDF? We are aware there isn’t a hard return after the line, and that adding one will prevent the issue, but our client has many documents already in this format and would like it if we could preserve the original formatting exactly so they don’t have to do so much work by hand to resolve this.

Thanks,
Michael Whalen

@mwhalen,

Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-16652. 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.

@mwhalen,

Regarding WORDSNET-16652, we completed the work on your issue and have come to a conclusion that this issue is actually not a bug. So, we will close this issue as ‘Not a Bug’. Please see the following details.

“Name:” in the problematic line is inside ADVANCE field. I am afraid, Advance field is not supported by Aspose.Words and likely will never be. We apologize for any inconvenience.