0

I am using MigraDoc + PDFsharp for generating a PDF (Salary slip). The PDF that is generated is by default vertical. (A4 - vertical).

I want it to be generated as Horizontal. What changes do I need to do?

currently I'm able to get this PDF

Sample image of expected output

  • Possible duplicate of [How to Set Document Orientation (for All Pages) in MigraDoc Library?](http://stackoverflow.com/questions/22674363/how-to-set-document-orientation-for-all-pages-in-migradoc-library) – I liked the old Stack Overflow Dec 17 '15 at 14:22

1 Answers1

1

I assume you want to know how to set page format to landscape.

PageSetup pageSetup = document.DefaultPageSetup.Clone();
// set orientation
pageSetup.Orientation = Orientation.Landscape;
// ... set other page setting you want here...

Assign that PageSetup to your section.

See also: How to Set Document Orientation (for All Pages) in MigraDoc Library?

Community
  • 1
  • 1