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

Free Support Forum - aspose.com

Line spacing changes when saving a document as a PDF

When we convert the attached file “sample.docx” to a PDF using Aspose.Words, the line spacing changes slightly, which is a major problem in legal documents.

To convert the document, we simply open it and save it, using code like:

Dim Document = New Aspose.Words.Document(SourceFile)

Dim SaveOptions As Aspose.Words.Saving.PdfSaveOptions = DirectCast(Aspose.Words.Saving.SaveOptions.CreateSaveOptions(Aspose.Words.SaveFormat.Pdf), Aspose.Words.Saving.PdfSaveOptions)

Document.Save(DestFile, SaveOptions)

I’ve attached the output of that save in the file “sample from aspose.pdf”. You can see that the line numbers on the left side of the document do not line up with the text portion of the document. I’ve also attached “sample from acrobat.pdf”, which is the same document converted using Acrobat, and you can see the lines are all spaced correctly there.

Some investigation has led us to believe this might have something to do with the Word option “Don’t center ‘exact line height’ lines”, which is found under File>Options>Advanced in Word.

Can something be done to get the line spacing correct? As I mentioned above, the line spacing on legal documents is very important, so this ends up being a major problem for our clients.


Michael Whalen

Hi Michael ,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-12999. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-12999) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.