public int GetNumberOfPages(string sourcePdfPath) { PdfReader reader = null; try { reader = new PdfReader(sourcePdfPath); return reader.NumberOfPages; } catch (Exception ex) { throw; } }