I have a table and a chart to be added to a PDF Document. I have used the iTextSharpLibrary to add the contents to the PDF file.

Actually the problem is that the chart has a width of 1500px and the table fits in comfortably in an A4 page size.

Actually the chart image that I get must not be scaled to fit in the page as it reduces the viewability. Hence, I need to add a new page that has a wider width than the other ones or at least change the page orientation to landscape and then add the image. How do I do this?

This is the code that I used to add a new page and then resize the page and then add the image. This is not working. Any fixes?

```
var imageBytes = ImageGenerator.GetimageBytes(ImageSourceId);
var myImage = iTextSharp.text.Image.GetInstance(imageBytes);

document.NewPage();

document.SetPageSize(new Rectangle(myImage.Width, myImage.Height));

myImage.ScaleToFit(document.PageSize.Width, document.PageSize.Height);
document.Add(myImage);

```