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

Add spacing or margin-top to paragraph

Feb 27, 2013 at 3:57 PM
Hi,

I read your lib does not support CSS styles. Would have been cool at least for the margin-top and margin-bottom e.g.:
<p style="margin-top: 12pt;">bla bla</p>
So if I need some extra space before a paragraph I need to add in my HTML some <br/> like this:
<p></p>
<p>bla bla</p>
or
<br/><br/> <!--or how many breaks I need to make it "look more or less how I want to")-->
<p>bla bla</p>
But it will be never precise as specifying exactly how many points (pt), any chance you can implement this support or let me know how to achieve this? For now the best I can do is do add the breaks.

Thanks for this awesome library, saved me already some headaches! ;) You did a good job!
Coordinator
Feb 28, 2013 at 12:24 AM
After your post, I have added the support for margin.
You can download the latest source code :)
Feb 28, 2013 at 7:28 AM
Thanks Olivier,

I just downloaded the last "nightly" source code, tested it and it works!

Good job and keep going! ;)
Coordinator
Feb 28, 2013 at 8:31 AM
glad to see it works like a charm. Thank you :)
Feb 28, 2013 at 8:42 AM
Edited Feb 28, 2013 at 8:45 AM
I just found a little issue regarding image resizing, but I guess that was an issue in the beta already... see under issue tracker I just reported it ;)

Thanks again man, your library rocks, I'll blog about it (surprisingly it hasn't so many downloads, it deserves for sure more advertizing)

Creating docs with the officially ms openxml library is just a pain (Imean, who the heck had the idea to create a run inside a paragraph -or viceversa- and add a child inside each element etc. it's so much not user friendly at all), with HtmlToOpenXml: piece of cake! Thanks again!