Convert Section in old DOM to Page in new DOM

Hi,


Is there any way i can convert Section object used in earlier release converted to Page object in new release.

Regards,
Sandeep

Hi Sandeep,


Thanks for your inquiry. I am afraid you can not convert section to page directly. However you can use Document class constructor that accepts Pdf object as following to access page object. Please find a sample code snippet for the purpose. Hopefully it will help you to accomplish your task.


Aspose.Pdf.Generator.Pdf pdf1 = new
Aspose.Pdf.Generator.Pdf();<o:p></o:p>

Aspose.Pdf.Generator.Section _sec = pdf1.Sections.Add();

....

....

....

Document doc = new Document(pdf1);

foreach (Page page in doc.Pages)

{

....

....

}

doc.Save(myDir+"output.pdf");

Please feel free to contact us for any further assistance.


Best Regards,