I’ve encountered an issue using Aspose.Pdf 18.5.0 where adding a Graph to a landscape page changes it to portrait. This only happens after accessing the page’s margins.
files.zip (491.4 KB)
Aspose.Pdf.Document pdf = new Aspose.Pdf.Document("test.pdf");
var l = pdf.PageInfo.Margin.Left; //without this, it will work as expected.
Aspose.Pdf.Drawing.Graph graph = new Graph(1, 5)
{
Top = 10,
Left = 20
};
graph.Shapes.Add(new Circle(10, 10, 10));
pdf.Save("landscape.pdf");
pdf.Pages[1].Paragraphs.Add(graph);
pdf.Save("notlandscape.pdf");