If you are using the source code version of PDFsharp, here is a change I tried successfully with your PDF file:
In file "PdfFormXObject.cs" go to the method "internal PdfFormXObject(PdfDocument thisDocument, PdfImportedObjectTable importedObjectTable, XPdfForm form)"
and look for the comment "// Translate the image such that its center lies on the center of the rotated bounding box".
I added an "if" around six lines of code:
Code:
if (rotate != 180)
{
// Translate the image such that its center lies on the center of the rotated bounding box
double offset = (height - width) / 2;
if (height > width)
matrix.TranslatePrepend(offset, offset);
else
matrix.TranslatePrepend(-offset, -offset);
}
This change was not yet approved by the PDFsharp master programmer.
Original source code (without this fix) can be found here:
http://pdfsharp.codeplex.com/releases/view/618773