PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jul 14, 2024 8:59 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Placing image above text
PostPosted: Thu Sep 29, 2011 10:31 am 
Offline

Joined: Thu Sep 29, 2011 10:06 am
Posts: 2
Greetings everyone.
I got some troubles with placing picture above text.
I need to place it after a text block, which placed after a table. And in my programm I don`t know size of the table and size of the text. Like on the picture:Image
I can`t place it with gfx.DrawImage because i don`t know exactly it coords.
And I can`t place it with section.AddImage because it only wraps text or place text above.
Have you any ideas how can i achieve it?
Can I obtain specified text block coords? Or can I do it with MigraDoc?

p.s. sorry for my english


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 29, 2011 12:35 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
You can use AddImage for that purpose.
Add code like
Code:
img.WrapFormat.Style = WrapStyle.Through;

and the text layouter will ignore the image.

Using code like
Code:
img.RelativeHorizontal = RelativeHorizontal.Column;
img.RelativeVertical = RelativeVertical.Line;

you can specify the image position relative to the position where you called AddImage.

See also:
viewtopic.php?f=2&t=1506&p=4370&hilit=WrapStyle.%2A#p4370
viewtopic.php?p=1050#p1050

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 29, 2011 4:31 pm 
Offline

Joined: Thu Sep 29, 2011 10:06 am
Posts: 2
Thank you, Thomas.
But I got something like this:
Image
The text is above image. But I don`t need a background.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group