Skip to content

Instantly share code, notes, and snippets.

@sq5gvm
sq5gvm / TwoPagesOnOne with rotation and correct apect ratio.cs
Last active July 15, 2023 10:05
PdfSharp - Tile pages rotating horizontal pages and preserving aspect ratio
#region PdfSharpHelpers
internal static bool isPdfPageHorizontal(ref XPdfForm form)
{
return (form.PointHeight < form.PointWidth);
}
static XRect scalePDFPageKeepAspectRatio(XRect maxdim, ref XPdfForm form)
{