KI
kim
September 17, 2010 03:37 PM UTC
Hi!
I got it working.
Thanks anyway!
Below is working code:
private void ConvertPdfToA1Size()
{
PdfDocument document1 = new PdfDocument();
//NEED TO SET THE PAGE SIZE HERE, IF NOT IT WILL USE DEFAULT SIZE WHICH IS CLIENT SIZE
document1.PageSettings.Size = PdfPageSize.A1;
PdfPage page = document1.Pages.Add();
PdfGraphics g = page.Graphics;
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(this.pdfPath1);
PdfPageBase lpage = loadedDocument.Pages[0];
PdfTemplate template = lpage.CreateTemplate();
//SizeF size = page.GetClientSize();
//SizeF size1 = lpage.Size;
//g.DrawPdfTemplate(template, PointF.Empty, page.GetClientSize());
g.DrawPdfTemplate(template, PointF.Empty,PdfPageSize.A1);
document1.Save(this.outPdfPath1);
document1.Close(true);
loadedDocument.Close(true);
System.Diagnostics.Process.Start(this.outPdfPath1);
}
AG
Angappan G
Syncfusion Team
September 17, 2010 03:44 PM UTC
Hi Kim,
Thanks for the update.
Please let us know if you have any queries.
Regards,
Angappan.