Unable to set PageWith and PageHeight

Hi,

It seems the page size will be always A4(8.26’x11.69’)…is it a bug or I
missed something?


Code:
Pdf pdf1 = new Pdf();
pdf1.PageSetup.PageWidth = PageSize.A2Width;
pdf1.PageSetup.PageHeight = PageSize.A2Height;
pdf1.Save(“C:\test.pdf”);


Hi,

Thanks for considering Aspose.

Please try using the following code snippet to accomplish your requirement.

[C#]

section.PageInfo.PageHeight = PageSize.A2Height;
section.PageInfo.PageWidth = PageSize.A2Width;

Please visit the following link for related information on how to set Set Page Size and Margins

In case it does not resolve your problem or you have any further query, please feel free to contact.

We apologize for your inconvenience.