Hello David,
Thanks for your patience.
We have further investigated the issue PDFNET-19658 "Segment Formating (Center Alignment) and Line spacing information is lost" we are not entirely certain about the cause of this issue. May be there have been some issue with older versions of the product. But in current version it looks according to the documentation:
Regarding Alignment issue, "This property should be set for the Text object rather than Segment object."
And about LineSpacing: "this property gets or sets a float value that indicates the spacing between two text lines. The unit is point."
So, if we set Alignment for text object equal Center and set LineSpacing = 20, you can generate a PDF document similar to the attached one generated with Aspose.Pdf for .NET 4.8.0.
In case it does not resolve your problem or you have any further query, please feel free to contact. We apologize for the delay and inconvenience.
FYI, In next few days, we are about to release a new version of Aspose.Pdf for .NET 4.9.0 and the PDF document generated with this version, also seems to be correct.
Nayyer Shahbaz
Support Developer, Aspose Sialkot Team
About Us Contact UsKeep in touch! We're on
Twitter and
Facebook