PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Footer formatting for PageOrientation.Landscape

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
jbanko



Joined: 24 Nov 2008
Posts: 2

PostPosted: Tue Nov 25, 2008 5:44 pm    Post subject: Footer formatting for PageOrientation.Landscape Reply with quote

I defined new MigraDoc document m_Doc and added section:
Section sec = m_Doc.AddSection();

Then I created the footer and appropriate paragraph:
HeaderFooter footer = sec.Footers.Primary;
Paragraph footerPara = new Paragraph();

Then I defined paragraph format:
ParagraphFormat pf = new ParagraphFormat(); and set the alignment to:
ParagraphAlignment.Right;

Page definition is:
PdfPage page = docRender.PdfDocument.Pages[0];
page.Size = PageSize.Letter;

While using page.Orientation = PageOrientation.Portrait and
XRect rect = new XRect(new XPoint(0, 0), new XSize(page.Width.Point, (page.Height.Point - 30)));
my footer was aligned to the right, but when I changed to page.Orientation = PageOrientation.Landscape; my ParagraphAlignment.Right; was around the centre.

What would be the proper solution to align to the right for landscape?
Back to top
View user's profile Send private message
jbanko



Joined: 24 Nov 2008
Posts: 2

PostPosted: Thu Nov 27, 2008 3:52 pm    Post subject: Footer formatting for PageOrientation.Landscape Reply with quote

I found the way how to resolve the footer formatting issues for landscape orientation:

1. After the footer section definition I defined last section page setup orientation as landscape for my MigraDoc document m_Doc:

m_Doc.LastSection.PageSetup.Orientation = Orientation.Landscape;

2. Then after setting the footer paragraph format I used the default page orientation portrait and the whole .pdf output was rendered with landscape orientation and I have full control over footer paragraph formatting:

page.Orientation = PageOrientation.Portrait;

So if anybody had similar challenge, you may probably use the same idea.
Jan
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com