Click here to Skip to main content
16,004,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to put a line space between an image and text using a docx dll


C#
string strFinalImagePath = @"C:\Images" + "\\" + strImages + ".Jpeg";

                                    Novacode.Image img = doc.AddImage(strFinalImagePath);
                                    Picture pic = img.CreatePicture();

                                    foreach (Paragraph p in doc.Paragraphs)
                                    {
                                        var valuesIndex = p.FindAll("<install_procedure>");

                                        if (valuesIndex.Count > 0)
                                        {
                                            p.Append(strText.Replace("  ", " ")).AppendPicture(pic).Append("          ");

                                        }

                                    }


How to put a line space between string and text in the above code.
Thanks in Advance
Posted
Updated 29-Oct-17 7:32am
v4
Comments
Zoltán Zörgő 2-Feb-15 3:46am    
What is docx.dll?
Renjith_R 2-Feb-15 3:49am    
without using interop dll we can create word document by using docx dll
http://docx.codeplex.com/
Zoltán Zörgő 2-Feb-15 3:50am    
Ok, but how can we know that you are speaking about that one..? :)
And you want to add an empty row after the image? Why not adding paragraph space after the image?
Renjith_R 16-Feb-15 2:46am    
I have tried with this
p.LineSpacing = 1.5f;
but still the text and image are coming in the same line.
how can I display image to next line ?
Please assist.

1 solution

doc.InsertParagraph(Environment.NewLine);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900