private void DeletePremisFiles(List <DateiDIP> premisFiles)
 {
     foreach (var file in premisFiles)
     {
         var path     = GetPath(file.Id, paketToConvert.Inhaltsverzeichnis.Ordner, rootFolder);
         var fileName = Path.Combine(path, file.Name);
         if (File.Exists(fileName))
         {
             MetadataXmlUpdater.RemoveFile(new FileInfo(fileName), paketToConvert, rootFolder);
             File.Delete(fileName);
         }
     }
 }
        private void CreatePdfFile(List <FileInfo> imageFileList, string pdfFileName)
        {
            var pdfDocument = new Document();
            var parents     = new DateiParents();

            foreach (var imageFile in imageFileList)
            {
                AddPage(pdfDocument, imageFile.FullName);
                pdfDocument.FreeMemory();

                parents = MetadataXmlUpdater.RemoveFile(imageFile, paketToConvert, rootFolder);
                imageFile.Delete();
            }

            pdfDocument.Save(pdfFileName);
            MetadataXmlUpdater.AddFile(new FileInfo(pdfFileName), parents);
        }