N
N
Nulltiton2022-03-31 20:04:39
C++ / C#
Nulltiton, 2022-03-31 20:04:39

How to read and output pdf from remote server to console?

I am creating a project in which I need to put the contents of a pdf file from a remote server into a variable, and then output the contents to the console, but the encoding is lost during the output.

The code:

String info;
using (StreamReader reader = new StreamReader("info.txt"))
{
    info = reader.ReadToEnd();
}
 Console.Write(info);

6245df0db5e5e013350159.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2022-03-31
@freeExec

So .txt or .pdf ? If you still believe your words, and not the code, then for this you need to take special components that can parse PDF. And it's not all that rosy there. If this is yours, better change the format to something simpler.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question