Ejemplo n.º 1
0
 private void loadLicence()
 {
     try {
         License lic = new License();
         lic.SetLicense("Aspose.Total.lic");
         _readyState = true;
     } catch (Exception) {
         ExceptionsService.displayError(new Exception("Error in loading License file."));
         _readyState = false;
     }
 }
Ejemplo n.º 2
0
 public void doSplit()
 {
     try {
         Document sourceDocument = new Document(_settings.SourcePdfFilePath);
         int      n = 0;
         sourceDocument.Pages.ToList().ForEach(
             sourcePage => {
             n++;
             PageNameModel pageSettings = _settings.PageNameList.FirstOrDefault(x => x.Id == n);
             if (pageSettings?.Name?.Trim().Length > 0)
             {
                 Document destinationDocument = new Document();
                 destinationDocument.Pages.Add(sourcePage);
                 destinationDocument.Save($"{_settings.OutputFilesPath}{pageSettings.Name}");
             }
         });
     } catch (Exception ex) {
         ExceptionsService.displayError(ex);
     }
 }