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; } }
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); } }