Hi Ushanandhini,
If you have to set a page margins please refer the bellow code snippet
doc.PageSettings.Margins.All = 40;
doc.PageSettings.Size = new SizeF(512, 810);
doc.PageSettings.Orientation = PdfPageOrientation.Portrait;
Can you please provide more information regarding your requirement, So that we will analyze in this and provide you the solution.
Regards,
Abirami.