private int GetNumberOfAttachmentPages(AttachmentPage attachmentPageSettings) { if (!attachmentPageSettings.Enabled) return 0; return _pdfProcessor.GetNumberOfPages(attachmentPageSettings.File); }
private int GetNumberOfAttachmentPages(AttachmentPage attachmentPage) { var count = 0; if (!attachmentPage.Enabled) { return(count); } try { count = attachmentPage.Files.Select(_processor.GetNumberOfPages).Sum(); } catch { _logger.Warn("Problem detecting page number of attachment page file \"" + attachmentPage.Files + "\""); count = 1; } return(count); }