Hello every one...
I am using free spire.pdf...I converted my xps file to a pdf file which is being done fine...But then i want to have my pdf in A4 size..After loading pdf file and changing the size everything becomes soo small and does not seem A4 size....Is there any way to fix it?Thanksss in advance..
dfDocument newPdf = new PdfDocument();
PdfDocument spiredoc1 = new PdfDocument();
spiredoc1.LoadFromFile("spire.pdf",FileFormat.PDF);
foreach (PdfPageBase page in spiredoc1.Pages)
{
PdfPageBase newPage = newPdf.Pages.Add(PdfPageSize.A4, new PdfMargins(0), 0, PdfPageOrientation.Portrait);
PdfTextLayout loLayout = new PdfTextLayout();
loLayout.Layout = PdfLayoutType.OnePage;
page.CreateTemplate().Draw(newPage, new PointF(0, 0), loLayout);
}
newPdf.SaveToFile("spire1.pdf",FileFormat.PDF);