Reputation: 39
SITUATION
QUESTIONS
The code is as follows
byte[][] pdfDoc= new byte[1][];
byte[] outputDoc = File.ReadAllBytes(@"d:/test.pdf");
for (int x = 0; x < pdfDoc.Length; x++)
{
pdfDoc[x] = outputDoc;
}
But it is failing, not able to read the file from the d:/test.pdf location. Thanks.
Upvotes: 3
Views: 19157
Reputation: 23113
I think this will work for you:
byte[] bytes = File.ReadAllBytes("c:\\folder\\myfile.pdf");
Upvotes: 9