start adding support for reading encrypted documents

This commit is contained in:
Eliot Jones
2019-05-04 15:36:13 +01:00
parent b2a3ae7a49
commit be394f5bba
21 changed files with 534 additions and 66 deletions

View File

@@ -13,27 +13,27 @@
[Fact]
public void Tests()
{
//var files = Directory.GetFiles("C:\\git\\testdocs", "*.pdf");
// var files = new[]{ @"C:\Users\eliot\Downloads\Encrypted1.pdf" };
//foreach (var file in files)
//{
// try
// {
// using (var document = PdfDocument.Open(file, new ParsingOptions{ UseLenientParsing = false}))
// {
// for (var i = 1; i <= document.NumberOfPages; i++)
// {
// var page = document.GetPage(i);
// var text = page.Text;
// Trace.WriteLine(text);
// }
// }
// }
// catch (Exception ex)
// {
// throw new InvalidOperationException($"Error parsing: {Path.GetFileName(file)}.", ex);
// }
//}
// foreach (var file in files)
// {
// try
// {
// using (var document = PdfDocument.Open(file, new ParsingOptions { UseLenientParsing = false }))
// {
// for (var i = 1; i <= document.NumberOfPages; i++)
// {
// var page = document.GetPage(i);
// var text = page.Text;
// Trace.WriteLine(text);
// }
// }
// }
// catch (Exception ex)
// {
// throw new InvalidOperationException($"Error parsing: {Path.GetFileName(file)}.", ex);
// }
// }
}
}
}