Exemple #1
0
 private void extractAndCreatePdfs(Dictionary <string, List <int> > pagesToExtract)
 {
     if (pagesToExtract.Count != 0)
     {
         PdfDocument pd = _pdfDocHandler.GetPdfDocumentFromPath(filePath);
         foreach (var item in _pageExtractor.PageExtraction(pd, pagesToExtract))
         {
             PdfDocument newPDF = new PdfDocument();
             foreach (var page in item.Value)
             {
                 newPDF.AddPage(page);
             }
             CreateOutputFolder();
             _pdfDocHandler.SavePdfFile(outputFolder + "/" + item.Key + ".pdf", newPDF);
         }
     }
 }