Migradoc Image in paragraph line

≯℡__Kan透↙ 提交于 2019-12-25 04:04:17

问题


I have pdf cover page where i have 5 paragraph lines, and over for those 5 paragraph line i need to be able to add a logo picture, so it will looks something like this :

Pragraph 1                                            First part of picture
Pragraph 2                                            Second part of picture
Pragraph 3                                            Third part of picture
Pragraph 4                                            fourth part of picture
Pragraph 5                                            fifth part of picture

Any ideas?

Right now if i create 5 lines and put a picture with wrapperformat set to through it just ends over or under paragraph lines.


回答1:


Simply set the right margins of the paragraphs to keep text and image apart.

With WrapFormat == through, images are ignored while laying out text - that's by design.

It's up to you to set paragraph margins to keep text and images separated if that's what you want.

You can set the margin for a paragraph (as shown below) or better create a style and assign that style to all paragraphs on the frontpage:

Paragraph paragraph = section.AddParagraph("Some text ...");
paragraph.Format.RightIndent = "6cm";

See the DefineStyles routine in this sample for further information about styles: http://www.pdfsharp.net/wiki/HelloMigraDoc-sample.ashx



来源:https://stackoverflow.com/questions/9622530/migradoc-image-in-paragraph-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!