Posted by a ceTe Software moderator
Hello,
You can achieve this by importing data from a PDF and adding it to a new page of a PDF. Please refer to the documentation on placing imported pages
here.
Here is a code sample:
PdfDocument pdf = new PdfDocument(@"Source PDF file format");
Document document = new Document();
for (int i = 0; i < pdf.Pages.Count; i++)
{
ImportedPageData impData = new ImportedPageData(pdf.Pages[i], 0, 0);
Page page = new Page(PageSize.A6, PageOrientation.Portrait);
//impData.Width = page.Dimensions.Body.Width;
//impData.Height = page.Dimensions.Body.Height;
impData.Width = page.Dimensions.Width;
impData.Height = page.Dimensions.Height;
page.Elements.Add(impData);
document.Pages.Add(page);
}
document.Draw(@"Path to save the PDF");
Thanks,
ceTe Software Support Team