MemoryStream stream = new MemoryStream();
Document doc = new Document();
PdfCopy writer = new PdfCopy(doc, stream);
doc.Open();
Document doc = new Document();
PdfCopy writer = new PdfCopy(doc, stream);
doc.Open();
Read what page you need.
add these page to writer.
index is start at 1
string path2 =".";
PdfReader pf = new PdfReader(path2);
page = writer.GetImportedPage(pf, 1);
writer.AddPage(page);
PdfReader pf = new PdfReader(path2);
page = writer.GetImportedPage(pf, 1);
writer.AddPage(page);
close
pf.Close();
doc.Close();
return stream;
doc.Close();
return stream;