PdfReader reader = new PdfReader("In.PDF"); Document doc = new Document(PageSize.A4, 0, 0, 0, 0); PdfWriter writer = PdfWriter.GetInstance(doc,
new FileStream("Out.PDF", FileMode.Create)); doc.Open(); PdfContentByte cb = writer.DirectContent; PdfImportedPage page = writer.GetImportedPage(reader, 1); //page #1 float Scale = 0.67f; cb.AddTemplate(page, Scale, 0, 0, Scale, 0, 0); doc.Close();
worked great. Thanks
ReplyDelete