PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun May 05, 2024 11:09 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Sun Oct 26, 2008 12:10 pm 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
Hi

I am combining text and images, and I need to keep headings of images together with images, so they are always at the same page. Sometimes it happens, heading is at the end of one page, and image on another.
How could I group these elemets together, soe they wll both be flowing on to next page if at the end of page ?

thx


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 27, 2008 10:32 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3097
Location: Cologne, Germany
Hi!

You can set this with the style or the paragraph of the heading:
Code:
paragraph.Format.KeepWithNext = true;

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 27, 2008 5:43 pm 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
thx very much
I'll give it a shot tonite
how about grouping two pics together ?

I tried to put them into paragrap, but then I was not able to position first pics (pic.Left didnt work)
normally I just add pics (generated from PDFSharp) via lastsection.AddImage("filename")


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 28, 2008 9:05 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3097
Location: Cologne, Germany
With pictures in paragraphs you should be able to use
Code:
paragraph.Format.LeftIndent

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 29, 2008 9:14 pm 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
well, I position upper image depending on value (Arrow that points out value on the bar chart, so the left position is variable
I am not sure I can change styles on runtime.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 29, 2008 11:18 pm 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
well if I style i via paragraph, then both are LeftIdented.
I just need to move firt image to right, second should stay


Top
 Profile  
Reply with quote  
 Post subject: I made it
PostPosted: Wed Oct 29, 2008 11:25 pm 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
Well, I managed.
I added first pic to one paragraph with ident and keepwith next
and second in normal paragraph
it all sticked together.

cool deal
thx man


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Nov 06, 2008 10:22 pm 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
Hi

I have problem with keeping chart and text together
somehow it will not render part of chart at the bottom of the page (as it's out of bonds (I would rather to put it on next page along with it's caption)


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 05, 2009 3:52 pm 
Offline

Joined: Thu Nov 05, 2009 3:49 pm
Posts: 1
I'm having the same problem but with Tables. I need to link a paragraph using Keep with next to a following table.

I am unable to do this as the table cannot be wrapped inside a paragraph.
I can't find any other way of joining the two elements.

Any ideas please post.

Thanks


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 86 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