Hello, Is it possible to create a pdf, with different page sizes, for example, i wanted the first page of the pdf to be 1024 X 768 width and height in pixel, and the second page would be 1280 X 560 width and height in pixel.
Hi Arun,
Document doc = new
Document();<o:p></o:p>
// Added page.
Aspose.Pdf.Page page1 = doc.Pages.Add();
PageInfo pageInfo = page1.PageInfo;
pageInfo.Width = 1024;
pageInfo.Height = 768;
page1.Paragraphs.Add(new TextFragment("test page 1"));
//Add the table into the paragraphs collection of section
Aspose.Pdf.Paragraphs paragraphs = page1.Paragraphs;
//Add content/data for the page
doc.ProcessParagraphs();
// Added New page.
Aspose.Pdf.Page page2 = doc.Pages.Add();
PageInfo pageInfo1 = page2.PageInfo;
pageInfo1.Width = 1280;
pageInfo1.Height = 560;
// add text fragment to paragraphs collection of Page object
page2.Paragraphs.Add(new TextFragment("test page 2"));
doc.ProcessParagraphs();
doc.Save(myDir + "PDF_diff_page_dim.pdf");
Please feel free to contact us for any further assistance.
Best Regards,