How do I add 1/2 inch to PDF page

How do I add 1/2 inch to the bottom of every page in a PDF? I don’t want to add a footer. I want to increase the pages size. If the page is 8.5 x 11, I want to increase the size to 8.5x11.5.

Thank you.

@salemantulsa

Thank you for contacting support.

Please try using below code snippet and then share your kind feedback with us.

Document document = new Document(dataDir + "Aspose.pdf");
PdfFileInfo info = new PdfFileInfo(document);
foreach (Page page in document.Pages)
{
    // Basic unit in Aspose.PDF is point, where 1 inch equals 72 points
    page.SetPageSize(info.GetPageWidth(page.Number), info.GetPageHeight(page.Number) + 36);
}
document.Save(dataDir + "SizeUpdated.pdf");