I've been using PDFSharp recently and needed to pull in some dynamic text and add it to the end of an existing PDF. The problem I had was knowing how much height the last piece of text used. I'm using XTextFormatter.DrawString and making it word wrap by providing plenty of height for it to work with.
As you can see I am giving DrawString the rest of the page to work with.
I've had to use a foreach loop rather than Linq because the Block class is private to the XTextFormatter class.
It's very hackety hacky, but it does work.
What I'd like to do is provide a fix to PDFSharp, probably in the form of a MeasureString method within the XTextFormatter class. I think I'd just refactor DrawString and MeasureString to use the same block/layout code, the difference being whether or not to Draw the string.
So, my question is - How do I contribute code to PDFSharp?
Alternatively you should copy this class in your own source code and modify it.
So where did you find an SVN repository you could connect to? On the listed sites at Codeplex and SoureForge, I'm only finding a .zip download for the source code. I'd rather pull the SVN repo and submit patches if I fix something / add a feature.