About Page Size in PDF

Hi Team,

I am facing issue in page size of pdf.
I am creating one new pdf …creating one new page…adding full size image on that page…after that appending all pages of another pdf…so that this image page will remain first page of my newly generated document…

but I am getting size different of first page…I want size of first page should be similar with the document which I am appending…

This is the code I am using…though I am always getting same size page…I want to set page size generic…please guide me for that…

Aspose.Pdf.Document pdf = new Aspose.Pdf.Document(pdf_filename);
Aspose.Pdf.Document new_pdf = new Aspose.Pdf.Document();
Aspose.Pdf.Page pg = new_pdf.Pages.Add();
Aspose.Pdf.Page page = new_pdf.Pages[1];

pg.PageInfo.IsLandscape = pdf.PageInfo.IsLandscape;
pg.PageInfo.Margin.Top = pdf.PageInfo.Margin.Top;
pg.PageInfo.Margin.Bottom = pdf.PageInfo.Margin.Bottom;
pg.PageInfo.Margin.Left = pdf.PageInfo.Margin.Left;
pg.PageInfo.Margin.Right = pdf.PageInfo.Margin.Right;
pg.PageInfo.Width = pdf.PageInfo.Width;
pg.PageInfo.Height = pdf.PageInfo.Height;
new_pdf.Pages.Add(pdf.Pages);
new_pdf.Save(Root+filename);

Please find Documents for your verifiData.zip (2.5 MB)
cation

@kotharib2

Thank you for contacting support.

We have worked with the data shared by you and have been able to notice the problem with PageInfo.Width property. It appears to extract the dimensions of first page only and same values is returned for pdf.Pages[3].PageInfo.Width property. Therefore, a ticket with ID PDFNET-45477 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

is there any other way to achieve my requirement then the way which I am following…because its urgency for me to take care on this issue…

@kotharib2

We are afraid currently there may not be any generic approach that you can use to set the page size. We will let you know as soon as the ticket will be resolved. We appreciate your patience and comprehension in this regard.

HI Team ,
I got solution to set page size similar …Thanks alot for efforts from your side.

@kotharib2

Thank you for your kind feedback.

We are glad to know that you have figured out a solution. We will let you know as soon as the logged ticket will be resolved.