How can I set an A4 document in landscape (horizontal) format in iTextSharp?
A4. Rotate(), 10, 10, 10, 10); In this mode all pages will be in landscape mode.
You can set the page size to a rotated A4. E.g. (assuming PDF, but should apply regardless):
iTextSharp.text.Document doc; // ...initialize 'doc'... // Set the page size doc.SetPageSize(iTextSharp.text.PageSize.A4.Rotate());
I've done this with PDF without trouble, haven't tried it with other doc types.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With