This project has moved and is read-only. For the latest updates, please go here.

How to add two paragraphs in the same line?

Dec 8, 2015 at 10:38 AM
Edited Dec 8, 2015 at 10:41 AM
Hi I would like to know how to add 2 paragraphs in the same line? For example , I want my document to look like this:

AAA: aaabbbccc (spacing) BBB:
CCC: aaabbbcccddd (spacing) DDD:

with the same spacing (from AAA: to BBB:) all the time as shown in the example,so not like this:

AAA:aaabbbccc (spacing) BBB:
CCC:aaabbbcccdddeeeff DDD:
Dec 12, 2015 at 3:23 PM
This idea of yours doesn't really have a problem with DocX library. It's a problem you have to figure out on coding approach. One sugggestion is that you would probably need to find a font that each letter has same width otherwise you will end up with huge issues.

So:
  • Find a font where each letter has same width or make sure that you know the width of each letter in font you are using
  • Make a method that takes the values, count of letters in a sentence
Probably easier to get help on things like this on http://stackoverflow.com for some code samples, as it has nothing to do with our library but is a concept approach only.
Marked as answer by MadBoy on 12/12/2015 at 7:23 AM