public PdfInfo(string file)
{
try
{
reader = new PdfReader(file);
NumberOfPages = reader.NumberOfPages;
SignatureNames = reader.AcroFields.GetSignatureNames().AsReadOnly();
}
catch (Exception e)
{
throw new ReadingPdfInfoFailedException($"Failed to read information from pdf file {file}", e);
}
finally
{
reader?.Close();
}
}
}