I’m using the .Net PDF generator, and I’m trying to create a landscape page. When I run the following, i get a null exception. If I swap the page height and width, the code works.
MemoryStream ms = new MemoryStream();
Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Generator.Section section = pdf.Sections.Add();
section.PageInfo.PageHeight = 100;
section.PageInfo.PageWidth = 250;
section.IsLandscape = true;
This message was posted using Page2Forum from How to - Set page orientation according to image dimensions - Aspose.Pdf for .NET