Hi,
I am building a doc using DocumentBuilder. I want to decrease the line spacing. I used
builder.getParagraphFormat().setLineSpacing(9);
But it does not work for the following
builder.writeln("2613 Camino Real");
Please help. I tried to search the forum and documentation. I tried every option. It is very critical. I am creating POC to purchase this product. I need to show to management by tomorrow. Please help. See attached java program…
2613 Camino Real
Dublin, CA, USA
925-913-2704 Work
925-913-2000 Cell
Instant Messanger: adam.nash@linkedIn.com
Twitter: twitter-account-id provider-account-it
LinkedIn Profile:
Hi
Thanks for your request. Actually, the problem occurs because you are using insertHtml method in your code. Please see the following code and comments:
builder.writeln("Vice President, Production Management at LinkedIn");
builder.insertHtml("Vice President, Production Management at LinkedIn");
// After insert HTML Ducument builder resets formatign applied before.
// So reapply paragraph spacing.
builder.getParagraphFormat().setSpaceAfterAuto(false);
builder.getParagraphFormat().setSpaceBeforeAuto(false);
builder.getParagraphFormat().setSpaceAfter(0);
builder.getParagraphFormat().setSpaceBefore(0);
builder.getFont().setBold(true);
builder.getFont().setSize(14);
builder.writeln("Contact Information");
builder.getFont().setSize(10);
builder.getFont().setBold(false);
Hope this helps.
Best regards,