예제 #1
0
 private void ExecuteForDocument(Input type, string filePath, string password, int dimOne, int dimTwo, int pageIndex, Action <IPageReader> action)
 {
     using (var docReader = _fixture.GetDocReader(type, filePath, password, dimOne, dimTwo))
         using (var pageReader = docReader.GetPageReader(pageIndex))
         {
             action(pageReader);
         }
 }
예제 #2
0
 private static int GetNonZeroByteCount(Input type, string filePath, LibFixture fixture)
 {
     using (var reader = fixture.GetDocReader(type, filePath, null, 1000, 1000))
     {
         using (var pageReader = reader.GetPageReader(0))
         {
             return(pageReader.GetImage().Count(x => x != 0));
         }
     }
 }
예제 #3
0
 public void GetDocReader_WhenCalledWithInvalidFileData_ShouldThrow(Input type)
 {
     Assert.Throws <DocnetException>(() => _fixture.GetDocReader(type, "Docs/protected_0.pdf", null, 10, 10));
 }