I am talking about PdfSharp. Portrait orientation works well with margin or without margin. But In case of landscape orientation, page truncate in right side once I set any
I had this same problem -- very frustrating. To anyone whom the top solution didn't work: try this!
Since PDFSharp can only handle graphics and transformations properly on pages in portrait orientation, my work-around on my project was converting the landscape pages to portrait with .page.Rotate = 0 upon input. Remember that these files are now sideways so keep that in mind when applying graphics and transformations. Then before saving the file, I converted the page back to landscape with .page.Rotate = 90. Worked fine for me! Good luck y'all.