Answer the question
In order to leave comments, you need to log in
Output string specific from C# PDF file?
Good day! Please help. How to display the value of the required line in the listBox from a PDF file in C #?
Here are code examples:
private void button5_Click(object sender, EventArgs e)
{
StreamReader File = new StreamReader(@"D:\BUH);
string s;
string x = "Основные средства";
while ((s = File.ReadLine()) != x)
{
listBox1.Items.Add(s);
}
}
ДРУГОЙ
var path = @"D:\rs.pdf";
var data = File.ReadAllLines(path);
var st = "Основные средства";
var flagR = false;
foreach (var it in data)
{
if (it == st) { flagR = true; }
if (flagR) { listBox1.Items.Add(it); }
}
Answer the question
In order to leave comments, you need to log in
It doesn't work that way with PDF. You find a plugin that can read it, study it. But in essence, all the work there is reduced to
ДайМнеСимволыИзПрямоугольникаСКоординатами(100, 50, 140, 30);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question