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

Free Support Forum - aspose.com

Set line spacing issue when set within pdf object

Hi support,

Here is a non-critical issue, at least at this time : a code line like pdf.getTextInfo().setLineSpacing(), where pdf is a Pdf object, does not seem to have any effect. Instead, it works when using a section object.


Hello Milan,

We apologize for your inconvenience. I have tested the issue and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFJAVA-5844. We will investigate this issue in detail and will keep you updated on the status of a correction.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Hello milan,

When you want to use the method: pdf.getTextInfo().setLineSpacing(), you have to call this method before any Section has been added to the document. As the pdf.getTextInfo().setLineSpacing() functions in the entire document, If you call this method later, it’s hard to adjust all the objects which have been added to the document to the linespacing you specified. Here is some demonstrating method.

Pdf pdf = new Pdf();
Section sec1 = pdf.getSections().add();
Text text1 = new Text(sec1," first line \n second line");

I hope this will help. Thank you for using our product!

The issues you have found earlier (filed as 5844) have been fixed in this update.