PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Oct 16, 2019 5:45 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Jul 10, 2018 2:25 pm 
Offline

Joined: Tue Jul 10, 2018 1:22 pm
Posts: 3
Location: London
Hi,

I have a set of method, that render up my PDF. They all seem to work as I would expect, except that I have a systematic offset in my FooterDistance. It is corrected if I add (empirically discovered) 3.6mm. I have done some extensive measuring with Illustrator on the resulting PDF. Everything looks right, except my footer is always too close to the bottom of the page.

To get the bottom of my 3 paragraphs (lines), 10mm from the bottom of the page, I need to give it a FooterDistance of 13.6mm. I don't know where this offset is coming from, so don't know how to correct it.

Any thoughts would be appreciated. I am happy to supply DDL if that is helpful, but don't want to clutter the place up with pointless data.

For testing purposes, the

FooterDistance is 13.6, but should be 10
BottomMargin is 25.0mm
FooterContentHeight is 15.53mm

Any insight as to why the footers are giving me so much trouble would be appreciated.

Jen

Edit to remove some incorrect data. Hard coded test items.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 10, 2018 2:38 pm 
Offline
PDFsharp Guru
User avatar

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

Could the extra space be coming from SpaceBefore, an extra line break before the text, or an empty paragraph before the text?

Jenifer wrote:
I am happy to supply DDL if that is helpful
That might be helpful, but could also prove to be a waste of our time.

Using the IssueSubmissionTemplate is the recommended method.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 10, 2018 2:49 pm 
Offline

Joined: Tue Jul 10, 2018 1:22 pm
Posts: 3
Location: London
Hi Thomas,

I don't think it is a SpaceBefore or SpaceAfter issue, as they are all explicitly set to zero (0) in the TextFrame.

Could the TextFrame be adding space?

Jen


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 10, 2018 3:34 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2980
Location: Cologne, Germany
Jenifer wrote:
Could the TextFrame be adding space?
Maybe. I do not use TextFrames if I do not need them.
Could be related to alignment (bottom or center instead of top).

Sometimes it helps to set background colors for paragraphs, textframes, and other items so you can see where they are.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 10, 2018 4:27 pm 
Offline

Joined: Tue Jul 10, 2018 1:22 pm
Posts: 3
Location: London
Hi Thomas,

Thank you, that lead me to the solution to the problem.

The height of the TextFrame was less than the height of the text it contained.

MigraDoc did the best it could in a bad situation. Simply making the container the correct size resolved all the problems.

Your help is very much appreciated.

Jen


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 349 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