PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jul 15, 2024 3:27 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
PostPosted: Mon Nov 03, 2014 7:15 am 
Offline

Joined: Thu Oct 30, 2014 9:19 am
Posts: 10
Hello,

I have a requirement that some headers in some pages might need to change. However, It looks like i couldn't do it using render info, cause the header's document object are the same for every page.

Anybody has any idea to do this?
Thanks


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 18, 2014 3:38 pm 
Offline
PDFsharp Guru
User avatar

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

You could leave the header empty, render the document using MigraDoc - and finally draw the headers using PDFsharp.
At this stage you can access the render information from MigraDoc to determine which document elements are on which page.

You can use the Tag property of each element for that purpose.


Or maybe you can use TextFrames for that purpose. TextFrames can have an absolute position. Set the background to solid white - if several TextFrames overlap on one page, the last one should be visible.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 09, 2015 7:06 am 
Offline

Joined: Thu Oct 30, 2014 9:19 am
Posts: 10
Thomas Hoevel wrote:
Hi!

You could leave the header empty, render the document using MigraDoc - and finally draw the headers using PDFsharp.
At this stage you can access the render information from MigraDoc to determine which document elements are on which page.

You can use the Tag property of each element for that purpose.


Or maybe you can use TextFrames for that purpose. TextFrames can have an absolute position. Set the background to solid white - if several TextFrames overlap on one page, the last one should be visible.


Hi Thomas,
Thanks for the reply. Do you have any sample? I read the sample of combining the Migradoc & PDFSharp to generate a document, however, it seems like we have to put in the location by complicated calculation.
Do you have any sample of using the tag to draw the header with PDF Sharp? \
Thanks!


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 34 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