Hi, has anyone noticed that pdfsharp doesn't deal very well with non-standard page sizes?
I've got a pdf with strange height and width (16.54 x 11.70 in) which is in landscape. I need to add some outlines to it. When I do so (with PdfSharp) and save it, the document has been converted to portrait and subsequently almost half of the page is cut off.
So, I add a routine to rotate the document to landscape before I add the outlines.
PdfDocument pdf = PdfReader.Open(pdfFile, PdfDocumentOpenMode.Modify);
foreach (PdfPage page in pdf.Pages)
{
page.Orientation = PdfSharpMod.PageOrientation.Landscape;
}
This yields the same result. It still is rotated to portrait, even though PdfSharp presumably knows that the contents of the page is not in portrait.
|