How to change size and margin while converting from html to pdf

Hi ,
I am new to Aspose , i am using aspose word for converting html to pdf stream .using following code

public byte[] RenderPdf(string htmlText)
    Document doc = new Document();
    DocumentBuilder builder = new DocumentBuilder(doc);

    PdfSaveOptions options = new PdfSaveOptions();
    options.Compliance = PdfCompliance.PdfA1b;
    MemoryStream memStream = new MemoryStream();
    doc.Save(memStream, options);
    memStream.Position = 0;
    byte[] bArrContent = memStream.ToArray();
    return bArrContent;

I need to change the default pdf size and set margin to document .Is there any option for doing it .?
Thanks in advanceā€¦

Hi Syam,

Thanks for your inquiry. Sure, you can change the document size and margins by using the PageSetup class. Moreover, I would suggest you please read the following article:

If we can help you with anything else, please feel free to ask.

Best Regards,