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