PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 4:05 pm

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
PostPosted: Wed Oct 20, 2010 4:38 pm 
Offline

Joined: Mon Oct 18, 2010 9:34 am
Posts: 14
i have such code
Code:
gfx.DrawString("Page "+number.ToString(), font, XBrushes.Firebrick,
              new XRect(new XPoint(), gfx.PageSize), XStringFormats.BottomCenter);


i want to draw page number in bottom right corner, but i don't see such parameter in XStringFormats, how can i solve it?


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 21, 2010 7:27 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
You are not limited to the pre-defined combinations.
You should be able to use your own BottomRight:
Code:
public static XStringFormat BottomRight
{
  get
  {
    XStringFormat format = new XStringFormat();
    format.Alignment = XStringAlignment.Far;
    format.LineAlignment = XLineAlignment.Far;
    return format;
  }
}


Or just use the inner code:
Code:
    XStringFormat format = new XStringFormat();
    format.Alignment = XStringAlignment.Far;
    format.LineAlignment = XLineAlignment.Far;

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 21, 2010 7:42 am 
Offline

Joined: Mon Oct 18, 2010 9:34 am
Posts: 14
thx


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: No registered users and 406 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