Hello, the code snippet below works (I am expanding the width by 1/8 inch), but I need to fine tune the results on a page by page bases.
Question #1: How is the page enlarged? Where is the 1/8 added and how is the content adjusted?
Question #2: How do I add the 1/8 inch to the left side for even pages and right size for odd pages?
Question #3: How to I add the 1/8 inch so there is 1/16 on the left and 1/16 on the right? In other words,
the content is centered?
public void Resize_Pages(Aspose.Pdf.Document docPdf)
{
PdfFileInfo info = new PdfFileInfo(docPdf);
foreach (Page page in docPdf.Pages)
{
double Width = info.GetPageWidth(page.Number);
double Height = info.GetPageHeight(page.Number);
Width = Width + (0.125 * 72);
page.SetPageSize(Width, Height);
page.PageInfo.Width = Width;
page.PageInfo.Height = Height;
}
}