在我的C#窗口应用程序中,我想阅读文本&来自ABC.pdf的图片,但密码受到保护。请帮助我解决这个问题。
PdfReader reader = new PdfReader(@"E:\ABC.pdf");
int intPageNum = reader.NumberOfPages;
string[] words;
string line;
for (int i = 1; i <= intPageNum; i++)
{
var text = PdfTextExtractor.GetTextFromPage(reader, i, new LocationTextExtractionStrategy());
words = text.Split('\n');
for (int j = 0, len = words.Length; j < len; j++)
{
line = Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(words[j]));
label1.Text = label1.Text + "\n" + line;
}
}