We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Working with pdfs

Hi Team,

I have a several pdfs having some number of pages each. I have to save all the pdfs as a single pdf using Aspose. Could anyone please help me out to solve this?

@vickyj

Thanks for contacting support.

Please use following code snippet in order to merge all PDF documents into single PDF file.

string[] files = Directory.GetFiles(dataDir + "PDFFolder/", "*.pdf");
Document finalDoc = new Document();
foreach(string filename in files)
{
  Document doc = new Document(filename);
  finalDoc.Pages.Add(doc.Pages);
}
finalDoc.Save(dataDir + "output.pdf");

In case you need further assistance, please feel free to let us know.